Re: Bound Property
Re: Bound Property
- Subject: Re: Bound Property
- From: Chris Hanson <email@hidden>
- Date: Thu, 19 Mar 2009 20:05:34 -0700
On Mar 19, 2009, at 7:37 PM, Richard Somers wrote:
Interface Builder used to call bound properties by the Objective-C
property name. For example NSWindow had a bound property
representedFilename.
Now in Interface Builder the bound property is Represented Filename
(capitol R space capitol F). I seem to be constantly confused as to
why the real property name is mangled into formal english.
Why the change?
Bindings in Cocoa are not the same thing as the properties that may be
used to implement their storage. For example, that an NSWindow's
"Represented Filename" binding may be implemented via its
"representedFilename" property could be considered an implementation
detail. When you are connecting the binding, the binding itself is
what you're connecting, not the property.
For example, you can create your own view that exposes a binding named
"My Binding" and doesn't provide any "myBinding" property at all
externally, or even internally. All your view needs to do is
implement the -exposedBindings, -bind:... and -unbind:... methods to
expose that binding, it doesn't need to implement an Objective-C level
property for use in representing that binding.
-- Chris
_______________________________________________
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