Re: when to register
Re: when to register
- Subject: Re: when to register
- From: Mike Abdullah <email@hidden>
- Date: Wed, 1 Mar 2006 00:31:54 +0000
OK, now I feel a little foolish! I had overlooked that method
thinking it was for when using a custom windowController only.
Should have read the docs more carefully! Sorry.
Mike.
On 28 Feb 2006, at 08:43, Scott Anguish wrote:
perhaps – windowControllerDidLoadNib:
On Feb 27, 2006, at 7:21 PM, Mike Abdullah wrote:
I have a document based app. In my document's nib, I have the
NSDocument subclass, a subclass of NSObject that holds the data
for the document and a NSObjectController.
I have got the NSObjectController to bind my NSObject to the
window's fields wonderfully. However, I having problems expanding
this. As part of my document window, I have a box that sets the
view it displays based upon one of the keys of my document data.
I cannot see any way of doing this directly from the bindings in
Interface Builder, so I figure what I want to do is register my
NSDocument for Key Value Observation with that key of my NSObject.
However, here's the difficulty, the init method of my NSDocument
happens before the init of my NSObject, so I cannot register for
the observations at that point. I can register during my
NSDocument's awakeFromNib method, but this happens after the
particular key is first set in the NSObject. And more
importantly, awakeFromNib occurs after the window has been loaded
and displayed, I need to first set this box's content before the
window is visible to the user.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden