Re: Plugin Information
Re: Plugin Information
- Subject: Re: Plugin Information
- From: "Kyle Sluder" <email@hidden>
- Date: Mon, 14 Apr 2008 03:50:17 -0400
On Mon, Apr 14, 2008 at 2:30 AM, Rick Langschultz <email@hidden> wrote:
> My code uses NSString *bundlePath, and NSBundle *bundle. I want to have
> something like *bundlePathA, *bundlePathB, etc; and *bundleA, *bundleB,
> *bundleC. Is there a simple way that I can do this?
What exactly are you trying to do? Use variable names that are
defined at runtime? You should already know that this is nonsensical
in C.
I think you're really looking for a mapping from bundle identifier to
class instance. That already exists. Once you've loaded the bundle,
you can use +[NSBundle bundleWithIdentifier:] to get it again
elsewhere, then use -[NSBundle principalClass] to get its principal
class. Then +alloc/-init as normal.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden