On 26 Sep 2012, at 17:37, Quincey Morris <quinceymor...@rivergatesoftware.com> 
wrote:

> On Sep 25, 2012, at 22:37 , Graham Cox <graham....@bigpond.com> 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]]];

It's worth noting that [self class] is a little bit dangerous here. If the 
instance happens to be a subclass of your class, you'll get back a different 
class and so search in the wrong bundle. Despite it feeling less clean, better 
to do:

        self = [super initWithNibName:@"MyNib" bundle:[NSBundle bundleForClass: 
[MyClass class]]];
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to