Class: SC.ChildArray
Extends
SC.Array, SC.Enumerable.
Defined in: child_array.js
- Since:
- SproutCore 1.0
Field Summary
- Fields borrowed from SC.Enumerable:
- isEnumerable
- Fields borrowed from SC.Array:
- isSCArray
Instance Methods
- editableChildren()
- normalize()
- objectAt(idx)
- readOnlyChildren()
- replace(idx, amt, recs)
- store()
- storeKey()
- toString()
Field Detail
defaultRecordType String- Default value:
- null
The name of the attribute in the parent record's datahash that represents this child array's data.
- Default value:
- null
If set, the parent record will be notified whenever the array changes so that it can change its own state
- Default value:
- null
Instance Method Detail
Returns an editable child array of JavaScript Objects.
Any changes to this array will not affect the parent record's datahash.
Looks up the store id in the store ids array and materializes a records.
- Parameters:
- idx Number
- index of the object to retrieve.
- Returns:
- SC.Record
- The nested record if found or undefined if not.
Returns the original child array of JavaScript Objects.
Note: Avoid modifying this array directly, because changes will not be
reflected by this SC.ChildArray.
Pass through to the underlying array. The passed in objects should be
nested SC.Records
, which can be converted to JavaScript objects or
JavaScript objects themselves.
- Parameters:
- idx Number
- index of the object to replace.
- amt Number
- number of objects to replace starting at idx.
- recs Number
- array with records to replace. These may be JavaScript objects or nested SC.Record objects.
- Returns:
- SC.ChildArray