Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bundleWithIdentifier: failures




On Dec 29, 2007, at 9:40 AM, Keith Duncan wrote:

I'm being floored by an issue where NSBundle's bundleWithIdentifier: is failing to load one of my frameworks.

NSBundles' bundleWithIdentifier: method won't load the bundle you are requesting, it will simply return an already initialized framework matching the identifier. If you want to get the image using this method you need to load the framework before attempting to use its resources. This can be done by simply linking against the framework.


The first statement here is correct; that's the behavior I was seeing. However, as I stated in my reply to Glenn, you need not load the framework if all you're accessing is resources (see docs on NSBundle's load)

Also, I'm able to dynamically find my image frameworks without the need of explicitly linking. This allows me to drop in new frameworks without the need of rebuilding the various IB Plug-Ins I now have.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >bundleWithIdentifier: failures (From: Ricky Sharp <email@hidden>)
 >Re: bundleWithIdentifier: failures (From: Keith Duncan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.