• 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: Cocoa class extension best practice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa class extension best practice


  • Subject: Re: Cocoa class extension best practice
  • From: Scott Ribe <email@hidden>
  • Date: Wed, 16 Oct 2013 15:58:45 -0600

On Oct 16, 2013, at 3:39 PM, Charles Srstka <email@hidden> wrote:

> 3. (This is the one I'd recommend) Instead of using NSNib, make a subclass of NSWindowController (if your nib defines a window) or NSViewController (if your nib defines a view). Then use either -[NSWindowController initWithWindowNibName:] or -[NSViewController initWithNibName:bundle:] to load the nib. This will produce correct behavior on any version of OS X, including 10.7, and gives you a few other niceties as well.

I'd second this; it's what I've been doing since 10.3 for non-document apps, and it works well. (I didn't even know about the NSNib stuff; I guess we started at different ends of the docs when we first tried to figure this out, you at nibs, and me at window controllers.)

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice





_______________________________________________

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: 
 >Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Kyle Sluder <email@hidden>)
 >Re: Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Graham Cox <email@hidden>)
 >Re: Cocoa class extension best practice (From: "Mills, Steve" <email@hidden>)
 >Re: Cocoa class extension best practice (From: Graham Cox <email@hidden>)
 >Re: Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Jens Alfke <email@hidden>)
 >Re: Cocoa class extension best practice (From: Ken Thomases <email@hidden>)
 >Re: Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Ken Thomases <email@hidden>)
 >Re: Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Charles Srstka <email@hidden>)
 >Re: Cocoa class extension best practice (From: Andy Lee <email@hidden>)
 >Re: Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Cocoa class extension best practice
  • Next by Date: Re: Core Data with ODBC databases?
  • Previous by thread: Re: Cocoa class extension best practice
  • Next by thread: Re: Cocoa class extension best practice
  • Index(es):
    • Date
    • Thread