Re: NSButton Behaviors
Re: NSButton Behaviors
- Subject: Re: NSButton Behaviors
- From: "Frank D. Engel, Jr." <email@hidden>
- Date: Tue, 2 Oct 2007 20:20:22 -0400
Excellent!
Somehow I missed that option.
I just did an experiment and I can build on this to get what I need.
Thank you!
On Oct 1, 2007, at 8:51 PM, Erik Buck wrote:
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
-----------------------------------------------------------
Frank D. Engel, Jr. <email@hidden>
$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten
Son, that whosoever believeth in him should not perish, but have
everlasting life.
$
_______________________________________________
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