Using a Continuous Control
A continuous control sends its action message at regular intervals as the user holds the mouse button down. For example, a continuous slider sends its action message repeatedly as the user moves the knob, and a continuous button sends its action message repeatedly as the user presses the button. If a control isnât continuous, it sends its action message only after the user releases the mouse.
To find out or change whether a control is continuous: send isContinuous or setContinuous: to its cell. By default, sliders are continuous and other controls are not.
To find out how often a continuous control sends its action message, use the method getPeriodicDelay:interval:., which returns the following:
The periodic delay is the amount of time (in seconds) that a continuous control will pause before starting to periodically send action messages to the target object. Itâs taken from the userâs defaults. If the user hasnât set it, itâs 0.4 seconds.
The interval is the amount of time (in seconds) between messages. By default, itâs taken from the userâs defaults. If the user hasnât set it, itâs 0.075 seconds.
(In Java, use the two methods periodicDelay and interval.)
If youâre using a button, use setPeriodicDelay:interval: to change these values programmatically. If youâre using another type of control, you must subclass the controlâs cell class to change them programmatically.
Copyright © 2008 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2008-10-15