• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWindowController and nib in framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindowController and nib in framework


  • Subject: Re: NSWindowController and nib in framework
  • From: Mike Abdullah <email@hidden>
  • Date: Wed, 26 Sep 2012 20:18:59 +0100

On 26 Sep 2012, at 17:37, Quincey Morris <email@hidden> wrote:

> 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]]];

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 (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

References: 
 >NSWindowController and nib in framework (From: Quincey Morris <email@hidden>)
 >Re: NSWindowController and nib in framework (From: Graham Cox <email@hidden>)
 >Re: NSWindowController and nib in framework (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSWindowController and nib in framework
  • Next by Date: Re: app developed for iPhone is compatible with iPad
  • Previous by thread: Re: NSWindowController and nib in framework
  • Next by thread: Core Data - nil-ing a relationship to a missing object
  • Index(es):
    • Date
    • Thread