home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!ni.umd.edu!sayshell.umd.edu!louie
- From: louie@sayshell.umd.edu (Louis A. Mamakos)
- Newsgroups: comp.sys.next.programmer
- Subject: Re: loading code dynamically with NXBundle
- Date: 23 Dec 1992 14:04:14 GMT
- Organization: University of Maryland, College Park
- Lines: 31
- Message-ID: <1h9rkuINNs4f@ni.umd.edu>
- References: <1992Dec23.045347.19934@iitmax.iit.edu>
- NNTP-Posting-Host: sayshell.umd.edu
- Keywords: NXBundle classNamed nib loads fine
-
- In article <1992Dec23.045347.19934@iitmax.iit.edu> thsscvc@iitmax.iit.edu (Chris Conley) writes:
-
- >Dec 22 22:02:07 localhost ConceptBoard[3348]: objc: class `PositioningMap'
- >not linked into application
-
- >// The following seems to work fine
- >if (myBundle = [[NXBundle alloc] initForDirectory:bundlePath]) {
- > printf("Seem to have gotten myBundle OK\n");
- >}
-
- This looks to be the problem here.
-
- >// This does not give me the Celebrate message
- >classObj = [[[myBundle classNamed:PositioningMap] alloc] initFrame:NULL];
- > if (classObj) {
- > printf("Celebrate good times, c'mon...\n");
- > }
-
- What I do, which seems to work just fine, is something like this:
-
- classObj = [[[myBundle principalClass] alloc] initFrame:NULL];
-
- Also, you're invoking the classNamed: method incorrectly;I think that
- this will work too:
-
- classObj = [[[myBundle classNamed:"PositioningMap"] alloc] initFrame:NULL];
-
- classNamed: take the *name* of the class, not a Class reference.
-
- louie
-
-