🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1949

Re: loading code dynamically with NXBundle

#1949
From: Louis A. Mamakos
Date: Wed, 23 Dec 1992 14:04
30 lines
1474 bytes
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
Technical Details
Message-ID: <1h9rkuINNs4f@ni.umd.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!ni.umd.edu!sayshell.umd.edu!louie
References: <1992Dec23.045347.19934@iitmax.iit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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