Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]
On Aug 20, 2009, at 10:59 AM, Kyle Sluder wrote: Use -awakeFromNib to do view setup (turning on layer backing, creating caches colors, etc.). Use -windowDidLoad (or - windowControllerDidLoadNib or whatever that NSDocument method is) for setting up inter-view relationships. Hmm ... so would you say to do otherwise is "doing it wrong" or "doing it sub-optimally"? I don't recall such guidelines in the documentation, so if I've missed it (or it's been added since I last studied the relevant docs), I would very much appreciate a reference. If not, I think this is a great topic of discussion (ie, a general architectural approach). -- I.S. ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]
On Aug 20, 2009, at 8:05 AM, "I. Savant" wrote: Hmm ... so would you say to do otherwise is "doing it wrong" or "doing it sub-optimally"? No, but if it winds up mattering, that's how it usually shakes out. So I tend to follow that pattern even before it begins to matter. --Kyle Sluder ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]
On Aug 20, 2009, at 11:05 AM, I. Savant wrote: On Aug 20, 2009, at 10:59 AM, Kyle Sluder wrote: Use -awakeFromNib to do view setup (turning on layer backing, creating caches colors, etc.). Use -windowDidLoad (or - windowControllerDidLoadNib or whatever that NSDocument method is) for setting up inter-view relationships. Hmm ... so would you say to do otherwise is "doing it wrong" or "doing it sub-optimally"? I'm relatively new to NSWindowController, but I think one benefit is avoiding multiple calls to awakeFromNib on the same object when you have objects in a nib which might themselves load nibs. --Andy ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com