• 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: NSStepper - useless?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSStepper - useless? (From: William Squires <email@hidden>)

  • Prev by Date: Re: NSTextView and -becomeFirstResponder
  • Next by Date: Can't create window context…crash
  • Previous by thread: Re: NSStepper - useless?
  • Next by thread: Re: NSStepper - useless?
  • Index(es):
    • Date
    • Thread