• 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: Interpreting action from NSStepper
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Interpreting action from NSStepper (From: David Alter <email@hidden>)

  • Prev by Date: Adding records to a child entity
  • Next by Date: Re: Changing name of newly created NSDocument (instead of 'Untitled i')
  • Previous by thread: Interpreting action from NSStepper
  • Next by thread: CFShow doesn't show up in non-admin user logs
  • Index(es):
    • Date
    • Thread