• 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: Additional action when a view's value changes (Cocoa Bindings)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Additional action when a view's value changes (Cocoa Bindings)


  • Subject: Re: Additional action when a view's value changes (Cocoa Bindings)
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 9 Dec 2009 09:37:15 -0800

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 (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: 
 >Additional action when a view's value changes (Cocoa Bindings) (From: Christian Ziegler <email@hidden>)
 >Re: Additional action when a view's value changes (Cocoa Bindings) (From: Christian Ziegler <email@hidden>)

  • Prev by Date: Re: [iPhone] UINavigationController and UINavigationBar
  • Next by Date: Re: CAShapeLayer and touches?
  • Previous by thread: Re: Additional action when a view's value changes (Cocoa Bindings)
  • Next by thread: Re: Additional action when a view's value changes (Cocoa Bindings)
  • Index(es):
    • Date
    • Thread