home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / programm / 7262 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.5 KB  |  48 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!rpi!batcomputer!munnari.oz.au!bruce.cs.monash.edu.au!monu6!ede978e
  3. From: ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson)
  4. Subject: Why doesn't this work? (Bundles)
  5. Message-ID: <1992Nov17.110635.2086@monu6.cc.monash.edu.au>
  6. Organization: Monash University, Caulfield Campus
  7. Date: Tue, 17 Nov 1992 11:06:35 GMT
  8. Lines: 38
  9.  
  10. I have my "new" method for a progress panel as such
  11.  
  12. + new
  13. {
  14.         char nibPath[MAXPATHLEN + 1];
  15.         NXBundle *bundle;
  16.  
  17.         if (!uniqueInstance) {
  18.                 NXZone *zone = NXCreateChildZone([self zone], vm_page_size, vm_p
  19. age_size, YES);
  20.                 NXNameZone(zone, "ProgressPanel");
  21.                 uniqueInstance = [[ProgressPanel alloc] init];
  22.                 bundle = [NXBundle bundleForClass:[self class]];
  23.                 if ([bundle getPath:nibPath forResource:"Gauge" ofType:"nib"]) {
  24.                         [NXApp loadNibFile:nibPath owner:uniqueInstance withName
  25. s:NO fromZone:zone];
  26.                 }
  27.                 NXMergeZone(zone);
  28.         }
  29.         return uniqueInstance;
  30. }
  31.  
  32. When it is like this, I get bizzare behaviour ie. the quit and hide menu options
  33. do absoluately nothing. However, when I change
  34.  
  35. [NXApp loadNibFile:nibPath owner:uniqueInstance withNames:NO fromZone:zone];
  36.  
  37. To
  38.  
  39. [NXApp loadNibFile:"Gauge.nib" owner:uniqueInstance withNames:NO fromZone:zone];
  40.  
  41. it works
  42.  
  43. The nib gets found in either case I just get the wierd menu behaviour that I
  44. cannot explain.
  45.  
  46. All help appreciated
  47.  
  48.