Re: NSStepper - useless?
Re: NSStepper - useless?
- Subject: Re: NSStepper - useless?
- From: Fritz Anderson <email@hidden>
- Date: Wed, 22 Feb 2012 15:48:21 -0600
On 19 Feb 2012, at 6:11 PM, William Squires wrote:
> Okay, 'nuther dumb question. How do I hook the different arrows in an NSStepper to actions in my view controller? Or how do I ask (id)sender which arrow was clicked?
It's not useless, it just doesn't have the use you hope for.
NSStepper is one control, with one value, and one action, not two buttons. Its function is to adjust its value in response to clicks. Clicking an arrow changes the value, and the action method informs you that the value has changed.
Because your application is well-designed, you have a model object that holds the current value, and you can compare it to the new one. The difference informs you whether it went up or down.
— F
_______________________________________________
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