Re: NSWindowController and nib in framework
Re: NSWindowController and nib in framework
- Subject: Re: NSWindowController and nib in framework
- From: Quincey Morris <email@hidden>
- Date: Wed, 26 Sep 2012 09:37:17 -0700
On Sep 25, 2012, at 22:37 , Graham Cox <email@hidden> wrote:
> Is the app sandboxed?
>
> I ask because I've had reports of this same error from the odd user but have been unable to reproduce it so far. It's ONLY happening since we sandboxed though.
No, the app has been around for a while and isn't sandboxed or code signed. It's possible, though, that the error only started happening after sandboxing was introduced, perhaps reflecting an implementation change in Cocoa frameworks.
There's another similar error that occurred some months ago where a view controller init in the same private framework failed:
self = [super initWithNibName: @"MyNib" bundle: [NSBundle bundleForClass: [self class]]];
I don't remember the exact exception message, but it basically said that the "MyNib" resource couldn't be found. In that case, changing the code to:
self = [super initWithNibName: @"MyNib" bundle: [NSBundle bundleWithIdentifier: frameworkBundleIdentifier]];
seemed to fix (or mask) the problem. However, finding the bundle that way *didn't* fix the window-nib-loading problem this time (the bundle was nil).
It's as if there's a short asynchronous step in finding bundles, which leaves a small timing window for failure that depends on the code order. I dunno.
_______________________________________________
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