Re: Trouble binding against transient Core Data property
Re: Trouble binding against transient Core Data property
- Subject: Re: Trouble binding against transient Core Data property
- From: Keary Suska <email@hidden>
- Date: Mon, 11 Oct 2010 16:08:35 -0600
On Oct 11, 2010, at 3:41 PM, Rick Mann wrote:
> [view bind: @"frame" toObject: controller withKeyPath: @"representedObject.frame" options: nil];
>
> And, nope. Now the value in the model puts the view in the specified place, but changing the view's frame does not propagate the change to the model. Does that mean that -[NSView frame] is not KVC-compliant, or that I still need custom code somewhere to create the binding?
NSView's "frame" is not an observable property, AFAIK. Generally the rule is, if the docs don't say it is observable, don't assume that it is or rely on future behavior if it acts as if it does.
Instead, you can register for NSViewFrameDidChangeNotification (see also -setPostsFrameChangedNotifications:).
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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