home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-Update.iso / Rhapsody / developer / examples / LocalizationExample.5.0.m.I.bs.tz / LocalizationExample.5.0.m.I.bs / LocalizationExample.5.0.I.bs / Source / LocalizationExampleObject.m < prev    next >
Encoding:
Text File  |  1998-01-13  |  1.4 KB  |  62 lines

  1. #import "LocalizationExampleObject.h"
  2.  
  3. @implementation LocalizationExampleObject
  4.  
  5. - (void)InfoPanel:(id)sender
  6. {
  7.     if (![NSBundle loadNibNamed:@"InfoPanel" owner:self])  {
  8.     NSLog(@"Failed to load InfoPanel.nib");
  9.         NSBeep();
  10.         return;
  11.         }
  12.  
  13. }
  14.  
  15. - (void)MoreInfo:(id)sender
  16. {
  17.     if (![NSBundle loadNibNamed:@"MoreInfo" owner:self])  {
  18.         NSLog(@"Failed to load MoreInfo.nib");
  19.         NSBeep();
  20.         return;
  21.         }
  22.  
  23. }
  24.  
  25. - (void)applicationDidFinishLaunching:(NSNotification *)notification
  26. // In order for your object to receive this notification make sure that
  27. // your object is a delegate or "File's Owner" in IB.
  28. // Connected from "File's Owner" to LocalizationExampleObject in this case.
  29. {
  30.  
  31.     [theWindow setTitle:NSLocalizedString(@"English Version", @"Title of the main window")];
  32.  
  33. }
  34.  
  35. - (void)myAction1:(id)sender
  36. {
  37.  
  38.     [theTextField setStringValue:NSLocalizedString(@"This is a localization example", @"Text contained in myAction1")];
  39.  
  40.     
  41. }
  42.  
  43. - (void)myAction2:(id)sender
  44. {
  45.     [theTextField setStringValue:NSLocalizedString(@"Using the OpenStep API's", @"Text contained in myAction2")];
  46.  
  47. }
  48.  
  49. - (void)myAction3:(id)sender
  50. {
  51.     [theTextField setStringValue:NSLocalizedString(@"Hopefully this example will help you understand", @"Text contained in myAction3")];
  52.  
  53. }
  54.  
  55. - (void)myAction4:(id)sender
  56. {
  57.     [theTextField setStringValue:NSLocalizedString(@"How localization is accomplished", @"Text contained in myAction4")];
  58.  
  59. }
  60.  
  61. @end
  62.