Class Index | File Index

Classes


Class wm.Variable


Extends wm.Component.

Defined in: Variable.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Base class for all data handling components.
Property Summary
Property Attributes Property Name and Description
Note: to support bindings it is recommend that you use the getValue/setValue API to access or modify properties.
 
True if this variable contains a list (aka array).
 
Type of data stored in the variable, or type of each item in the list.
Fields borrowed from class wm.Component:
name, owner

Method Summary
Method Attributes Method Name and Description
 
addItem(inData, inIndex)
Adds an item to the list of data.
 
Clear all data values.
 
Return the number of items in the list owned by this variable (only valid if isList is true).
 
Retrieves the data item at the current list cursor.
 
Export data from this variable into a plain old JavaScript object (POJSO).
 
getItem(inIndex)
Return an item by numeric index in the list owned by this variable (only valid if isList is true).
 
removeItem(inIndex)
Removes an item from the list of data.
 
setCursor(inCursor)
Set the cursor by index.
 
setData(inData)
Copy data into this variable.
 
Sets the cursor to the first item.
 
setItem(inIndex, inData)
Set an item by numeric index in the list owned by this variable (only valid if isList is true).
 
Sets the cursor to the last item.
 
Increments the cursor.
 
Decrements the cursor.
Methods borrowed from class wm.Component:
constructor, createComponent, destroy, getId, getRuntimeId

Methods borrowed from class wm.Object:
extendSchema, getPropertyType, getPropFlags, getValue, listDataProperties, listProperties, setValue, toString

Class Detail
wm.Variable()
Base class for all data handling components.
Report errata or suggestions for Variable.
Property Detail
Note: to support bindings it is recommend that you use the getValue/setValue API to access or modify properties.
{Boolean} isList
True if this variable contains a list (aka array).
Report errata or suggestions for isList.

{String} type
Type of data stored in the variable, or type of each item in the list.
Report errata or suggestions for type.
Method Detail
addItem(inData, inIndex)
Adds an item to the list of data. Only functions if data forms a list.
Parameters:
{wm.Variable or Object} inData
The data to add, either a an Object or wm.Variable
{Number} inIndex
(Optional) The numeric index at which to insert the data.
Returns:
Any
Report errata or suggestions for addItem.

clearData()
Clear all data values.
Report errata or suggestions for clearData.

getCount()
Return the number of items in the list owned by this variable (only valid if isList is true).
Returns:
Number
Report errata or suggestions for getCount.

getCursorItem()
Retrieves the data item at the current list cursor. If data is not a list, returns the Variable
Returns:
wm.Variable
Report errata or suggestions for getCursorItem.

getData()
Export data from this variable into a plain old JavaScript object (POJSO).
Returns:
Object
Report errata or suggestions for getData.

getItem(inIndex)
Return an item by numeric index in the list owned by this variable (only valid if isList is true).
Parameters:
{Number} inIndex
The numeric index of the item to fetch
Returns:
Any
Report errata or suggestions for getItem.

removeItem(inIndex)
Removes an item from the list of data. Only functions if data forms a list.
Parameters:
{Number} inIndex
The numeric index of the item to remove.
Returns:
Any
Report errata or suggestions for removeItem.

setCursor(inCursor)
Set the cursor by index. When data forms a list, the cursor indicates the item used in calls to getValue.
Parameters:
{Number} inCursor
The numeric index of the item to use as the Variable's
Returns:
Any
Report errata or suggestions for setCursor.

setData(inData)
Copy data into this variable.

Input data can be a primitive value, an array, a plain old JavaScript object (POJSO), or a wm.Variable. Success of setData requires that the type of the input is compatible with the type of this variable.
Parameters:
{Any} inData
Input data.
Report errata or suggestions for setData.

setFirst()
Sets the cursor to the first item.
Returns:
Any
Report errata or suggestions for setFirst.

setItem(inIndex, inData)
Set an item by numeric index in the list owned by this variable (only valid if isList is true).
Parameters:
{Number} inIndex
The numeric index of the item to set
{Any} inData
The data to store
Report errata or suggestions for setItem.

setLast()
Sets the cursor to the last item.
Returns:
Any
Report errata or suggestions for setLast.

setNext()
Increments the cursor.
Returns:
Any
Report errata or suggestions for setNext.

setPrevious()
Decrements the cursor.
Returns:
Any
Report errata or suggestions for setPrevious.

Documentation generated by JsDoc Toolkit 2.0.1 on Wed Jun 03 2009 13:28:38 GMT-0700 (PDT)