Methods



doubleHiValue

- (double)doubleHiValue; 

Returns the receiver's high knob value as a double.

Result: The receiver's high knob value as a double.

doubleLoValue

- (double)doubleLoValue; 

Returns the receiver's low knob value as a double.

Result: The receiver's low knob value as a double.

floatHiValue

- (float)floatHiValue; 

Returns the receiver's high knob value as a float.

Result: The receiver's high knob value as a float.

floatLoValue

- (float)floatLoValue; 

Returns the receiver's low knob value as a float.

Result: The receiver's low knob value as a float.

intHiValue

- (int)intHiValue; 

Returns the receiver's high knob value as an int.

Result: The receiver's high knob value as an int.

intLoValue

- (int)intLoValue; 

Returns the receiver's low knob value as an int.

Result: The receiver's low knob value as an int.

lockedSliders

- (BOOL)lockedSliders; 

Determine if the two sliders are locked together. The low and high knobs will always have the same value if this is true. The end user can not change this setting at run time.

NOTE: This value is currently saved, but the locking behavior is unimplemented.

Result: YES if the two knobs are locked together.

objectHiValue

- (id)objectHiValue; 

Returns the receiver's high knob value as an Objective-C object if a valid object has been associated with the receiver; otherwise, returns nil. To be valid, the receiver must have a formatter capable of converting the object to and from its textual representation.

Result: The receiver's high knob value as an Objective-C object.

objectLoValue

- (id)objectLoValue; 

Returns the receiver's low knob value as an Objective-C object if a valid object has been associated with the receiver; otherwise, returns nil. To be valid, the receiver must have a formatter capable of converting the object to and from its textual representation.

Result: The receiver's low knob value as an Objective-C object.

setDoubleHiValue:

- (void)setDoubleHiValue:(double)aDouble; 

Sets the high knob value of the receiver to an object aDouble, representing a double value. In its implementation, this method invokes setObjectValue:. The value is pinned between the low knob and maximum slider values.

Parameters

NameDescription
aDoubleAn double precision number to set the high knob value to.

setDoubleLoValue:

- (void)setDoubleLoValue:(double)aDouble; 

Sets the low knob value of the receiver to an object aDouble, representing a double value. In its implementation, this method invokes setObjectValue:. The value is pinned between the minimum and high knob slider values.

Parameters

NameDescription
aDoubleAn double precision number to set the low knob value to.

setFloatHiValue:

- (void)setFloatHiValue:(float)aFloat; 

Sets the high knob value of the receiver to an object aFloat, representing a float value. In its implementation, this method invokes setObjectValue:. The value is pinned between the low knob and maximum slider values.

Parameters

NameDescription
aFloatAn floating point number to set the high knob value to.

setFloatLoValue:

- (void)setFloatLoValue:(float)aFloat; 

Sets the low knob value of the receiver to an object aFloat, representing a float value. In its implementation, this method invokes setObjectValue:. The value is pinned between the minimum and high knob slider values.

Parameters

NameDescription
aFloatAn floating point number to set the low knob value to.

setIntHiValue:

- (void)setIntHiValue:(int)anInt; 

Sets the high knob value of the receiver to an object anInt, representing an integer value. In its implementation, this method invokes setObjectValue:. The value is pinned between the low knob and maximum slider values.

Parameters

NameDescription
anIntAn integer to set the high knob value to.

setIntLoValue:

- (void)setIntLoValue:(int)anInt; 

Sets the low knob value of the receiver to an object anInt, representing an integer value. In its implementation, this method invokes setObjectValue:. The value is pinned between the minimum and high knob slider values.

Parameters

NameDescription
anIntAn integer to set the low knob value to.

setLockedSliders:

- (void)setLockedSliders:(BOOL)inLocked; 

Lock the two sliders together, so it functions just like a normal NSSlider. The low and high knobs will have the same value. The end user can not change this setting at run time.

The low knob value gets set to the high knob value immediately.

NOTE: This value is currently saved, but the locking behavior is unimplemented.

Parameters

NameDescription
inLockedYES if you want to lock the two knobs together.

setObjectHiValue:

- (void)setObjectHiValue:(id)obj; 

Sets the receiver's object value to object. The value is pinned between the low knob and maximum slider values.

Parameters

NameDescription
objAn object containing a numeric value.

setObjectLoValue:

- (void)setObjectLoValue:(id)obj; 

Sets the receiver's object value to object. The value is pinned between the low knob and maximum slider values.

Parameters

NameDescription
objAn object containing a numeric value.

setStringHiValue:

- (void)setStringHiValue:(NSString *)aString; 

Sets the high knob value of the receiver to aString. In its implementation, this method invokes setObjectValue:. If no formatter is assigned to the receiver, or if the formatter cannot "translate" aString to an underlying object, the receiver is flagged as having an invalid object. The value is pinned between the low knob and maximum slider values.

Parameters

NameDescription
aStringShould be a string containing a number.

setStringLoValue:

- (void)setStringLoValue:(NSString *)aString; 

Sets the low knob value of the receiver to aString. In its implementation, this method invokes setObjectValue:. If no formatter is assigned to the receiver, or if the formatter cannot "translate" aString to an underlying object, the receiver is flagged as having an invalid object. The value is pinned between the minimum and high knob slider values.

Parameters

NameDescription
aStringShould be a string containing a number.

setTrackingLoKnob:

- (void)setTrackingLoKnob:(BOOL)inValue; 

Are we tracking on the low knob or the high knob? Note that the end user can change this by clicking on one knob or the other, or by using the tab key to cycle through the knobs.

The standard methods -doubleValue, -intValue, -setDoubleValue:, -setIntValue: etc. will all use either the low or the high knob depending on this setting.

Parameters

NameDescription
inValueYES if you want to track on the low knob.

stringHiValue

- (NSString *)stringHiValue; 

Returns the receiver's high knob value as an NSString as converted by the receiver's formatter, if one exists. If no formatter exists and the value is an NSString, returns the value as aa plain, attributed, or localized formatted string. If the value is not an NSString or can't be converted to one, returns an empty string.

Result: The receiver's high knob value as an NSString object.

stringLoValue

- (NSString *)stringLoValue; 

Returns the receiver's low knob value as an NSString as converted by the receiver's formatter, if one exists. If no formatter exists and the value is an NSString, returns the value as aa plain, attributed, or localized formatted string. If the value is not an NSString or can't be converted to one, returns an empty string.

Result: The receiver's low knob value as an NSString object.

trackingLoKnob

- (BOOL)trackingLoKnob; 

Are we tracking on the low knob or the high knob? The end user can change this by clicking on one knob or the other, or by using the tab key to cycle through the knobs.

The standard methods -doubleValue, -intValue, -setDoubleValue:, -setIntValue: etc. will all use either the low or the high knob depending on this setting.

Result: YES if the double slider is tracking on the low knob.

© 2003-2006 Snowmint Creative Solutions LLC (Last Updated 2006-12-05)