defining min/max and step when using com.livecode.pi.number
Posted: Fri May 06, 2016 10:36 pm
The documentation says that, when defining a numerical property for a widget, we should use the com.livecode.pi.number editor in the LCB script of the widget being created. This editor is described as, "com.livecode.pi.number: a single-line field, with a slider if the property has an associated min/max and an increment/decrement twiddle if it has a step value." This is exactly what I would like to create in the properties inspector.
The LCB script for the "SVG Icon" widget contains this code for setting the "angle" property which appears with a slider and an increment/decrement twiddle in the properties inspector:
property "angle" get mAngle set setAngle
metadata angle.editor is "com.livecode.pi.number"
metadata angle.default is "0"
metadata angle.label is "Rotation"
... but I couldn't find any definition of min/max and the step value in the script.
How/where in Livecode Builder do we define the "associated" min/max, and also the desired "step value" ... when using the com.livecode.pi.number editor
The LCB script for the "SVG Icon" widget contains this code for setting the "angle" property which appears with a slider and an increment/decrement twiddle in the properties inspector:
property "angle" get mAngle set setAngle
metadata angle.editor is "com.livecode.pi.number"
metadata angle.default is "0"
metadata angle.label is "Rotation"
... but I couldn't find any definition of min/max and the step value in the script.
How/where in Livecode Builder do we define the "associated" min/max, and also the desired "step value" ... when using the com.livecode.pi.number editor