Re: NSButton Behaviors
Re: NSButton Behaviors
- Subject: Re: NSButton Behaviors
- From: Erik Buck <email@hidden>
- Date: Mon, 1 Oct 2007 20:51:37 -0400
I was about to code up a simple NSButton subclass that sends its
action message continuously while held down, but then I checked the
documentation:
See NSButton: http://developer.apple.com/documentation/Cocoa/
Reference/ApplicationKit/Classes/NSButton_Class/Reference/Reference.html
"setPeriodicDelay:interval:
Sets the message delay and interval periods for a continuous button.
- (void)setPeriodicDelay:(float)delay interval:(float)interval
Parameters
delay
The amount of time (in seconds) that a continuous button will pause
before starting to periodically send action messages to the target
object. The maximum allowed value is 60.0 seconds; if a larger value
is supplied, it is ignored, and 60.0 seconds is used.
interval
The amount of time (in seconds) between each action message. The
maximum value is 60.0 seconds; if a larger value is supplied, it is
ignored, and 60.0 seconds is used.
Discussion
The delay and interval values are used if the button is configured
(by a setContinuous: message) to continuously send the action message
to the target object while tracking the mouse.
Availability
Available in Mac OS X v10.0 and later.
See Also
– setContinuous: (NSControl)"
I just made a button continuous in IB, and indeed it sends its action
message continuously as long as it is held down.
_______________________________________________
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