nl_tokens: If you are implementing an object that supports Ember . Array call this method just before 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 ; } // Make sure the @each proxy is set up if anyone is observing @each if ( Ember . isWatching ( this , '@each' ) ) { get ( this , '@each' ) ; } Ember . sendEvent ( this , '@array:before' , [ this , startIdx , removeAmt , addAmt ] ) ; var removing , lim ; if ( startIdx >= 0 && removeAmt >= 0 && <mask> ( this , 'hasEnumerableObservers' ) ) { removing = [ ] ; lim = startIdx + removeAmt ; for ( var idx = startIdx ; idx < lim ; idx ++ ) removing . push ( this . objectAt ( idx ) ) ; } else { removing = removeAmt ; } this . enumerableContentWillChange ( removing , addAmt ) ; return this ; }