Re: Interpreting action from NSStepper
Re: Interpreting action from NSStepper
- Subject: Re: Interpreting action from NSStepper
- From: Graham Cox <email@hidden>
- Date: Wed, 13 May 2009 11:24:58 +1000
On 13/05/2009, at 9:47 AM, David Alter wrote:
When a user clicks on my stepper my action method gets called. How
can I
identify if the user is clicking the up arrow or the down arrow
Thanks for the help
Steppers don't work like that. They have a value, like a slider. The
value gets incremented and decremented according to what you click,
within the min and max value limits set (e.g. in IB). You could tell
whether it went up or down by comparing the current value with the
previous one, but there's not normally any need to do that. Instead,
the stepper's action method is usually the same one that gets called
by, say, an associated text field, which can just pull the current
value using [sender floatValue].
--Graham
_______________________________________________
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