Re: Loading Cocoa Bundles
Re: Loading Cocoa Bundles
- Subject: Re: Loading Cocoa Bundles
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sun, 27 Feb 2005 19:07:26 +0100
At 10:24 Uhr -0700 27.02.2005, Chaz McGarvey wrote:
On Feb 27, 2005, at 6:08 AM, M. Uli Kusterer wrote:
At 10:39 Uhr -0700 25.02.2005, Chaz McGarvey wrote:
I am trying to dynamically load a bundle (for a plugin
architecture) using NSBundle, but it fails to load. Here is the
loading code I'm using:
// load plugin
if ( !bundle ) {
NSLog( @"no bundle.." );
}
if ( ![bundle load] ) {
NSLog( @"bundle didn't load" );
}
_pluginClass = [bundle principalClass];
// now instantiate, etc.
// end
It *might* help if you showed us how "bundle" is actually created,
you know...?
Nobody's here to steal your code (at least not if it's that
pointless :-p), so don't be afraid and paste some more.
I'm obviously not afraid of stolen code as my code is free and open
source. I just thought it would be pointless to list the steps it
takes to create a loadable bundle (it doesn't take any code) because
they're so trivial, but if you want them...
Actually, I was thinking more of how you initialize the "bundle"
variable. You didn't post that code, and if it failed on that step,
you'd obviously get no success on the other calls because you'd be
sending a message to NIL.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden