Main Page | Packages | Class Tree | Index | Help

xp.data

interface IDataProvider


interface IDataProvider

DataProvider Interface


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Method Summary


addItem ( value ): Void
Appends an item to the end of the array


addItemAt ( index : Number, value ): Void
Adds an item at the specified index


addItemsAt ( index : Number, newItems : Array ): Void
For adding several items to the array


getItemAt ( index : Number )
Gets the item at the specified index


removeAll ( Void ): Void
Removes all items


removeItemAt ( index : Number )
Removes the item at the specified index


removeItemsAt ( index : Number, len : Number ): Void
For removing several items from the Array views to the model


replaceItemAt ( index : Number, itemObj ): Void
Replaces the item at the specified index


sortItems ( compareFunc, optionFlags ): Void
Sorts the array by using a compare function


sortItemsBy ( fieldName, order ): Void
Sorts the array by some field of each item



Method Documentation

addItem

function addItem(value): Void
Appends an item to the end of the array

Appends an item to the end of the array

Parameters:
value
the item to add (relaxed type for strings / objects)

addItemAt

function addItemAt(index : Number,
 value): Void
Adds an item at the specified index

Adds an item at the specified index

Parameters:
index
index location in the array to insert
value
the item to add

addItemsAt

function addItemsAt(index : Number,
 newItems : Array): Void
For adding several items to the array

Parameters:
index
index the location for the items to be inserted
newItems
newItems the array of new items to add

getItemAt

function getItemAt(index : Number)
Gets the item at the specified index

Gets the item at the specified index

Parameters:
index
index the location of the item to return
Returns:
the item at the location

removeAll

function removeAll(Void): Void
Removes all items

Removes all items

Parameters:
Void
index the location of the item to remove

removeItemAt

function removeItemAt(index : Number)
Removes the item at the specified index

Removes the item at the specified index

Parameters:
index
index the location of the item to remove
Returns:
the item being deleted - relaxed return type for string / object

removeItemsAt

function removeItemsAt(index : Number,
 len : Number): Void
For removing several items from the Array views to the model

Parameters:
index
index the location of the items to remove
len
len the number of items to remove

replaceItemAt

function replaceItemAt(index : Number,
 itemObj): Void
Replaces the item at the specified index

Replaces the item at the specified index

Parameters:
index
index the location of the item to remove
itemObj

sortItems

function sortItems(compareFunc,
 optionFlags): Void
Sorts the array by using a compare function

Sorts the array by using a compare function

Parameters:
compareFunc
- the function to use for comparing items
optionFlags
the options accepted by Array.sort

sortItemsBy

function sortItemsBy(fieldName,
 order): Void
Sorts the array by some field of each item

Sorts the array by some field of each item

Parameters:
fieldName
the field (or array of fieldNames) upon which to sort
order
either "asc" or "desc", or the options accepted by Array.sort

The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc