Re: Framework Nibs Not Loading 10.4 to 10.3
Re: Framework Nibs Not Loading 10.4 to 10.3
- Subject: Re: Framework Nibs Not Loading 10.4 to 10.3
- From: j o a r <email@hidden>
- Date: Tue, 24 May 2005 16:53:34 +0200
On 24 maj 2005, at 16.33, Kirk Kerekes wrote:
For various reasons, [NSBundle bundleForClass:] is not particularly
reliable, particularly if the bundle is a framework. I'll let
someone who knows the internal differences in bundle-loading
between 10.3 and 10.4 chime in as to why, and I will restrict
myself to noting what appears to be a good general-purpose
solution: [NSBundle bundleWithIdentifier:].
Add a unique bundle-identifier (as in
"com.mycompany.myframeworkname") to your framework, and then use
that identifier to find the framework bundle.
Still, the debug logs seems to show that he actually manages to find
the correct bundle (at least it looks that way to me). I think that
the problem is not finding the bundle, but loading resources from the
bundle.
Using a specific bundle identifier seems like a more fragile solution
to me, as it would break if you were to move source between projects
without being careful about updating the bundle identifier.
Of course, in theory you would never do that - copy source between
projects - as that would mean that you're duplicating code rather
than re-using your framework in that other project... ;-)
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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