Bindings, enabling controls based on multiple values
Bindings, enabling controls based on multiple values
- Subject: Bindings, enabling controls based on multiple values
- From: Steve Sims <email@hidden>
- Date: Tue, 25 May 2004 17:19:07 -0400
I have a control within an app that I would like to attach a slightly
complex enabling binding to which relies on two different keys. Now my
data model is structured, and both of these keys are within a single
object within my model.
Now I already had a value transformer to manage enabling this control
based on one of those keys. What I hoped was to be able to look for
changes in the enclosing key, but this is not working.
What I had before was a control bound to the key "effect.style", but I
wished to change this to look for changes just on "effect", with my
value transformer doing this:
if (([effect style] == 5) || (([effect style]==4) && ([effect
angle]>=90))) {
return [NSNumber numberWithBool:YES];
}
When I tried this, changing my key to just "effect" I found that my
value transformer gets called only on start-up, and not when
"effect.style" or "effect.angle" changed.
Any ideas how I can work around this?
Steve
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.