Re: Combing Bindings with Target-Action
Re: Combing Bindings with Target-Action
- Subject: Re: Combing Bindings with Target-Action
- From: Quincey Morris <email@hidden>
- Date: Thu, 16 Apr 2009 00:21:24 -0700
On Apr 15, 2009, at 12:04, Jeff Hutchison wrote:
I am relying on the binding messages to complete before the
target-action message - is this an OK idea?
If you look at the diagram in:
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/MessageFlow.html#/
/apple_ref/doc/uid/TP40002149-186285
it's clear that either the model *must* be updated via the binding
before the action is sent to the target *unless* the action is sent
between step 5 and step 6. (The final value of the UI object is not
settled until step 5.)
If *that* was going to happen, it'd be hard to believe that it
wouldn't always happen, and as you've already seen, it doesn't. So I'd
say your assumption is safe for Tiger and Leopard.
Given how intimately the model validation (and hence the binding) is
tied to setting the object's own value, I can't imagine the relative
order getting switched in the future either.
FWIW
_______________________________________________
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