Method XbpSetting():setData() Foundation

Sets the current value or state of the toggle.

Syntax
:setData( [<xValue>] ) --> xOldValue
Parameters
<xValue>
<xValue> is a logical or numeric value depending on the type of toggle (how many states are available). This value defines the new state of the XbpSetting object. When a data code block is registered in the instance variable :dataLink, <xValue> is optional.
Return

This method returns the value stored in the edit buffer of the toggle before the :setData() method is called.

Description

The :setData() method changes the value for the current state of the toggle. The parameter <xValue> does not need to be included when a data code block is contained in the instance variable :dataLink. If :setData() is called without a parameter, the data code block in :dataLink is evaluated and its return value is used as <xValue> (see DataRef()). If a code block is not contained in :dataLink, a value must be specified for <xValue>.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.