• 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: Bound Property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bound Property


  • Subject: Re: Bound Property
  • From: Richard Somers <email@hidden>
  • Date: Thu, 19 Mar 2009 22:49:30 -0600

On Mar 19, 2009, at 9:05PM, Chris Hanson wrote:

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.


The Cocoa Bindings Reference documentation lists all built-in bindings that are available in the frameworks. Every one of them has an Objective-C type method name like myBinding not "My Binding".

The NSKeyValueBindingCreation Protocol Reference describes the class method +(void)exposeBinding:(NSString *)binding where the binding parameter is "The key path for the property to be exposed." So a property is exposed by the binding.

The property may not correspond to an instance variable but there will be accessors for the property. A property named "My Property" simply can not exist in code. Spaces are not allowed in method names.

Right?

Richard

_______________________________________________

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


  • Follow-Ups:
    • Re: Bound Property
      • From: Ken Thomases <email@hidden>
References: 
 >Bound Property (From: Richard Somers <email@hidden>)
 >Re: Bound Property (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Banding/smoothing problem with drawing angled gradients.
  • Next by Date: How to debug this...
  • Previous by thread: Re: Bound Property
  • Next by thread: Re: Bound Property
  • Index(es):
    • Date
    • Thread