|
The Gravy Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--OObject
|
+--Observer
|
+--Model
|
+--ListModel
This class encapsulates a data model for a List of objects.
This class implements the Collection interface.
Author: Bruce Wallace (PolyGlotInc.com)
Defined in mvc.js
Version: 1.0
| Constructor Summary | |
ListModel
()
|
|
| Method Summary | |
Object
|
_pop( )
pop top item off list but dont publish |
Object
|
_push(o)
push item onto list but dont publish |
void
|
_reset( )
clear list and update timestamp but dont publish |
void
|
addBefore(i,o)
add the given object into the list just before the given zero-based-index |
Object
|
addItem(o)
push given item onto list and publish |
String
|
dump()
debug method to return this list as a string |
int
|
getCount( )
return count of items in list |
Object
|
getItem(i)
return item in list with given index |
String
|
getItemStr(i)
return item in list with given index as formatted string |
void
|
iterate(<Function> f)
iterate thru items in list calling specified function |
void
|
konstructor( <String> optName )
|
void
|
reset( )
clear list and publish |
| Methods inherited from class Model |
dumpSubscribers, toString, dirty, clean, neverChanged, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
|
| Methods inherited from class Observer |
update, subscribe
|
| Constructor Detail |
ListModel()
| Method Detail |
Object _pop( )
Object _push(o)
void _reset( )
void addBefore(i,o)
Object addItem(o)
String dump()
int getCount( )
Object getItem(i)
String getItemStr(i)
void iterate(<Function> f)
f - function that takes index and object as params and returns true if the iteration should be stopped before all items in list are processed.
void konstructor( <String> optName )
optName - optional name of this instance
void reset( )
|
The Gravy Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||