• 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: Problems with bindings and "continuously updates"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with bindings and "continuously updates"


  • Subject: Re: Problems with bindings and "continuously updates"
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 18 Oct 2007 11:04:13 -0400

> I'm having some troubles with some read-only bindings.  I have
> several NSString values that are composites of other values (so
> there's no setMyStringValue method, just a myStringValue method), and
> they are not being checked properly by the text fields that are bound
> to them, even when I have "Continuously Updates Value" checked.

  You should (re?)read the Key Value Observing Programming Guide:

http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/index.html

  ... as this information is covered there. In a nutshell, you need to
implement the method:

+setKeys:triggerChangeNotificationsForDependentKey:

  ... and register dependent keys. For example, changes to -firstName
and -lastName should trigger an update on -fullName. As to where to
implement this and how, read the docs, search Google; the answers are
there once you know what to look for.

--
I.S.
_______________________________________________

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: Problems with bindings and "continuously updates"
      • From: "I. Savant" <email@hidden>
References: 
 >Problems with bindings and "continuously updates" (From: Timothy Collett <email@hidden>)

  • Prev by Date: Re: Problems with bindings and "continuously updates"
  • Next by Date: Re: Problems with bindings and "continuously updates"
  • Previous by thread: Re: Problems with bindings and "continuously updates"
  • Next by thread: Re: Problems with bindings and "continuously updates"
  • Index(es):
    • Date
    • Thread