Re: NSStepper - How can I tell which arrow has been clicked?
Re: NSStepper - How can I tell which arrow has been clicked?
- Subject: Re: NSStepper - How can I tell which arrow has been clicked?
- From: Lance Bland <email@hidden>
- Date: Fri, 19 Apr 2002 18:14:19 -0400
Julian-
On Friday, April 19, 2002, at 05:46 PM, Julian Barkway wrote:
Any ideas? The documentation on this topic is pretty much worthless.
Wow! I have never used NSStepper, but I see what you mean.
You may want to do this:
get the initial value from the stepper by calling [stepper intValue] and
store that.
Then in the action method call [stepper intValue] again. If the return
value is greater than the initial value then it increased (up arrow
clicked) , otherwise it decreased (down arrow clicked). Then store that
int value for the next time the action method is called so you can do
the same thing.
You may also want to use a NSMatrix and two cells with left and right or
up and down arrows. That way you can get which arrow was clicked.
-lance
------------------------------------
Lance Bland
mailto:email@hidden
web charts at
http://www.vvi.com/products/chart
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.