Class: SC.ChildArray


Extends SC.Array, SC.Enumerable.

A `ChildArray` is used to map an array of `ChildRecord` objects.

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

Field Detail

defaultRecordType String
If set, it is the default record `recordType`
Default value:
null
propertyName String

The name of the attribute in the parent record's datahash that represents this child array's data.

Default value:
null
record

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

editableChildren()

Returns an editable child array of JavaScript Objects.

Any changes to this array will not affect the parent record's datahash.

normalize()
Calls normalize on each object in the array
objectAt(idx)

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.
readOnlyChildren()

Returns the original child array of JavaScript Objects.

Note: Avoid modifying this array directly, because changes will not be reflected by this SC.ChildArray.

replace(idx, amt, recs)

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
store()
The store that owns this child array's parent record.
storeKey()
The storeKey for the parent record of this child array.
toString()
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:20 GMT-0600 (CST)