home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / next / programm / 7893 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.4 KB

  1. Path: sparky!uunet!haven.umd.edu!ni.umd.edu!sayshell.umd.edu!louie
  2. From: louie@sayshell.umd.edu (Louis A. Mamakos)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: loading code dynamically with NXBundle
  5. Date: 23 Dec 1992 14:04:14 GMT
  6. Organization: University of Maryland, College Park
  7. Lines: 31
  8. Message-ID: <1h9rkuINNs4f@ni.umd.edu>
  9. References: <1992Dec23.045347.19934@iitmax.iit.edu>
  10. NNTP-Posting-Host: sayshell.umd.edu
  11. Keywords: NXBundle classNamed nib loads fine
  12.  
  13. In article <1992Dec23.045347.19934@iitmax.iit.edu> thsscvc@iitmax.iit.edu (Chris Conley) writes:
  14.  
  15. >Dec 22 22:02:07 localhost ConceptBoard[3348]: objc: class `PositioningMap' 
  16. >not linked into application
  17.  
  18. >// The following seems to work fine
  19. >if (myBundle = [[NXBundle alloc] initForDirectory:bundlePath]) {
  20. >    printf("Seem to have gotten myBundle OK\n");
  21. >}
  22.  
  23. This looks to be the problem here.
  24.  
  25. >// This does not give me the Celebrate message     
  26. >classObj = [[[myBundle classNamed:PositioningMap] alloc] initFrame:NULL];
  27. >        if (classObj) {
  28. >            printf("Celebrate good times, c'mon...\n");
  29. >        }
  30.  
  31. What I do, which seems to work just fine, is something like this:
  32.  
  33. classObj = [[[myBundle principalClass] alloc] initFrame:NULL];
  34.  
  35. Also, you're invoking the classNamed: method incorrectly;I think that
  36. this will work too:
  37.  
  38. classObj = [[[myBundle classNamed:"PositioningMap"] alloc] initFrame:NULL];
  39.  
  40. classNamed: take the *name* of the class, not a Class reference.
  41.  
  42. louie
  43.  
  44.