• 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 window] fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSWindowController window] fails


  • Subject: Re: -[NSWindowController window] fails
  • From: "Kyle Sluder" <email@hidden>
  • Date: Fri, 28 Nov 2008 11:13:17 -0500

On Fri, Nov 28, 2008 at 5:06 AM, Alexander Shmelev <email@hidden> wrote:
> - (id) init
> {
>        if (![super initWithWindowNibName:@"Dialog"])
>                return nil;
>        [self window];
> }

1) You never set self.  Inside an initializer, you must always set
self to the result of the calling super's designated initializer.
2) Why are you calling -window inside -init?  The whole point is that
the window controller doesn't load the nib until necessary (lazy
loading).

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: -[NSWindowController window] fails
      • From: Alexander Shmelev <email@hidden>
References: 
 >-[NSWindowController window] fails (From: Alexander Shmelev <email@hidden>)

  • Prev by Date: question re: mem leak analysis and RSIZE
  • Next by Date: Re: IKImageBrowserView and mouseDragged event
  • Previous by thread: -[NSWindowController window] fails
  • Next by thread: Re: -[NSWindowController window] fails
  • Index(es):
    • Date
    • Thread