On Dec 9, 2009, at 05:47, Christian Ziegler wrote:

> Sorry I got to correct myself, it's not Cocoa Bindings, but direct 
> target/action. So I connected the takeIntegerValue action of both views to 
> each other in contrast to connecting it to a controller.
> 
> 
> On 09.12.2009, at 14:26, Christian Ziegler wrote:
> 
>> Hi all!
>> 
>> I got a NSTextView and an NSStepper binded together, so that the textfield's 
>> and the stepper's values are in sync. This is very confinient, however I 
>> need additional things to be done whenever the value changes (basically just 
>> a method invocation). So far I've accomplished that by not using bindings 
>> but target/action instead, still I am wondering whether there is a way to do 
>> that via bindings (overriding a certain method?!) 
>> 
>> Can anybody help me out on this?

Can you restate your question? With your correction, it's no longer clear what 
you're asking.

If you're currently using an action for each of the text and stepper views, 
then in your action methods you can simply call another method that does the 
"additional things". How are you expecting bindings to make this any easier, if 
that's what you're asking?

If you use bindings for the values of the views, then you can override the 
setter method (the 'setXxx:' method of the property "xxx" that the views are 
bound to) and do "additional things" in the setter (as well as setting the 
value of the instance variable that backs the property). If that's what you're 
asking.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to