lib/packages/core-classes.js
function(source_array, names) {

		var i = 0,
			count = source_array.length,
			items_removed_argument = {
				uids: this._data_uids,
				values: this._data_values,
				names: this._data_names
			};

		this._data_uids = [];
		this._data_values = [];
		this._data_names = [];

		for (; i < count; i++) {
			this._push(this._uid++, source_array[i], names[i] || null);
		}

		this._setLength(count);

		this._fire('items_removed', items_removed_argument);

		this._fire('items_added', {
			uids: this._data_uids.slice(),
			values: this._data_values.slice(),
			names: this._data_names.slice()
		});

		this._fire('collection_changed');

	}
function(source_array, names) {

		var i = 0,
			count = source_array.length,
			items_removed_argument = {
				uids: this._data_uids,
				values: this._data_values,
				names: this._data_names
			};

		this._data_uids = [];
		this._data_values = [];
		this._data_names = [];

		for (; i < count; i++) {
			this._push(this._uid++, source_array[i], names[i] || null);
		}

		this._setLength(count);

		this._fire('items_removed', items_removed_argument);

		this._fire('items_added', {
			uids: this._data_uids.slice(),
			values: this._data_values.slice(),
			names: this._data_names.slice()
		});

		this._fire('collection_changed');

	}
function ( source_array , names ) { var i = 0 , count = source_array . length , items_removed_argument = { uids : this . _data_uids , values : this . _data_values , names : this . _data_names } ; this . _data_uids = [ ] ; this . _data_values = [ ] ; this . _data_names = [ ] ; for ( ; i < count ; i ++ ) { this . _push ( this . _uid ++ , source_array [ i ] , names [ i ] || null ) ; } this . _setLength ( count ) ; this . _fire ( 'items_removed' , items_removed_argument ) ; this . _fire ( 'items_added' , { uids : this . _data_uids . slice ( ) , values : this . _data_values . slice ( ) , names : this . _data_names . slice ( ) } ) ; this . _fire ( 'collection_changed' ) ; }
Remove all current values and add values from array
@param {Array} source_array
@param {Array.<string>} names
Remove all current values and add values from array