On 19.11.2009, at 18:45, Keary Suska wrote: > On Nov 19, 2009, at 10:32 AM, Christian Ziegler wrote: > >> For instance I got a NSStepper and I only need the integerValue of that >> stepper. I could either define an IBOutlet and access the integerValue with >> [stepper integerValue], or I could define a property and bind the steppers >> value to it. As I mentioned I don't have to manipulate that stepper in any >> way, I really only need the value. I just wanna know what's best practice. > > Bindings are generally used to synchronize between a model object and view. > When considering a one-way actions, I generally use IBOutlets to manipulate a > view, but use target-action for passive activities. So, if it were me, and > all I cared about was what value an NSStepper was set to, I would just set > the target/action to my controller object and read the value in the action. > Although in this case I would set autorepeat to NO so my method is only > called once. > > HTH, > > Keary Suska > Esoteritech, Inc. > "Demystifying technology for your home or business" >
In the action method, do you store the changed value in a variable? Cheers, Chris _______________________________________________ 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