• 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: Combing Bindings with Target-Action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Combing Bindings with Target-Action


  • Subject: Re: Combing Bindings with Target-Action
  • From: "Jeremy W. Sherman" <email@hidden>
  • Date: Thu, 16 Apr 2009 00:12:16 -0400

> I am relying on the binding messages to complete before the
> target-action message - is this an OK idea?

It sounds like you already know the answer to that. It's likely not
worth the trouble of trying to straighten out the race condition, when
you can just dodge the problem entirely and use KVO, as Kyle
suggested.

If you find KVO overly ugly, there are wrappers around it, such as one
provided by Mike Ash (see
http://www.mikeash.com/?page=pyblog/key-value-observing-done-right.html;
the code itself is available both at
http://mikeash.com/svn/MAKVONotificationCenter/ and through GTM at
http://code.google.com/p/google-toolbox-for-mac/source/browse/trunk/Foundation/GTMNSObject+KeyValueObserving.m).

—Jeremy

On Wed, Apr 15, 2009 at 11:26 PM, Kyle Sluder <email@hidden> wrote:
> On Wed, Apr 15, 2009 at 3:04 PM, Jeff Hutchison
> <email@hidden> wrote:
>> I am relying on the binding messages to complete before the
>> target-action message - is this an OK idea?
>
> Why not just register as an observer of the bound property?
>
> --Kyle Sluder
> _______________________________________________
>
> 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
>
_______________________________________________

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

References: 
 >Combing Bindings with Target-Action (From: Jeff Hutchison <email@hidden>)
 >Re: Combing Bindings with Target-Action (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Fwd: C: treated as a path component
  • Next by Date: Re: NSOpenGLView and antialiasing
  • Previous by thread: Re: Combing Bindings with Target-Action
  • Next by thread: Re: Combing Bindings with Target-Action
  • Index(es):
    • Date
    • Thread