nl_tokens: If you are implementing an object that supports Ember . Array call this method just after the array content changes to notify any observers and invalidate any related properties . Pass the starting index of the change as well as a delta of the amounts to change .
pl_tokens: function ( startIdx , removeAmt , addAmt ) { // if no args are passed assume everything changes if ( startIdx === undefined ) { startIdx = 0 ; removeAmt = addAmt = - 1 ; } else { if ( removeAmt === undefined ) removeAmt = - 1 ; if ( addAmt === undefined ) addAmt = - 1 ; } var adding , lim ; if ( startIdx >= 0 && addAmt >= 0 && get ( this , 'hasEnumerableObservers' ) ) { adding = [ ] ; lim = startIdx + addAmt ; for ( var idx = startIdx ; idx < lim ; idx ++ ) adding . push ( this . objectAt ( idx ) ) ; } else { adding = addAmt ; } this . enumerableContentDidChange ( removeAmt , adding ) ; Ember . sendEvent ( this , '@array:change' , [ this , startIdx , removeAmt , addAmt ] ) ; var <mask> = get ( this , 'length' ) , cachedFirst = cacheFor ( this , 'firstObject' ) , cachedLast = cacheFor ( this , 'lastObject' ) ; if ( this . objectAt ( 0 ) !== cachedFirst ) { Ember . propertyWillChange ( this , 'firstObject' ) ; Ember . propertyDidChange ( this , 'firstObject' ) ; } if ( this . objectAt ( length - 1 ) !== cachedLast ) { Ember . propertyWillChange ( this , 'lastObject' ) ; Ember . propertyDidChange ( this , 'lastObject' ) ; } return this ; }