webgui/www/extras/extjs/docs/output/Ext.util.MixedCollection.html

1127 lines
No EOL
64 KiB
HTML

<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Ext.util.MixedCollection</title>
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
<!-- GC -->
</head>
<body>
<div class="body-wrap">
<div class="top-tools">
<img src="../resources/print.gif" width="16" height="16" align="absmiddle">&nbsp;<a href="Ext.util.MixedCollection.html" target="_blank">Print Friendly</a><br/>
</div>
<h1>Class Ext.util.MixedCollection</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td>Ext.util</td></tr>
<tr><td class="label">Class:</td><td>MixedCollection</td></tr>
<tr><td class="label">Extends:</td><td><a href="Ext.util.Observable.html">Observable</a></td></tr>
<tr><td class="label">Defined In:</td><td><a href="MixedCollection.jss.html">MixedCollection.js</a></td></tr>
</table>
<div class="description">
A Collection class that maintains both numeric indexes and keys and exposes events. </div>
<br />
<a href="#properties">Properties</a>
&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#methods">Methods</a>
&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#events">Events</a>
<hr />
<a name="properties"></a>
<h2>Public Properties</h2>
<div class="no-members">This class has no public properties.</div> <a name="methods"></a>
<h2>Public Methods</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Method</th>
<th class="msource-header">Defined By</th>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#MixedCollection">MixedCollection</a>(<code>Boolean allowFunctions</code>, <code>Function keyFn</code>)</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc"></td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#add">add</a>(<code>String key</code>, <code>Object o</code>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Adds an item to the collection.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#addAll">addAll</a>(<code>Object/Array objs</code>) : void</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Adds all elements of an Array or an Object to the collection.</td>
</tr>
<tr class="alt">
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#addEvents">addEvents</a>(<code>Object object</code>) : void</td>
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#addEvents">Observable</a></td>
</tr>
<tr class="alt">
<td class="mdesc">Copies any events from the passed object onto this object if they do not already exist. The passed object
must also ...</td>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#addListener">addListener</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>) : void</td>
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#addListener">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Appends an event handler to this component</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#clear">clear</a>() : void</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Removes all items from the collection.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#clone">clone</a>() : MixedCollection</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Creates a duplicate of this collection</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#contains">contains</a>(<code>Object o</code>) : Boolean</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns true if the collection contains the passed Object as an item.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#containsKey">containsKey</a>(<code>String key</code>) : Boolean</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Returns true if the collection contains the passed Object as a key.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#each">each</a>(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : void</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Executes the specified function once for every item in the collection, passing each
item as the first and only parame...</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#eachKey">eachKey</a>(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : void</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Executes the specified function once for every key in the collection, passing each
key, and its associated item as th...</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#filter">filter</a>(<code>String property</code>, <code>String/RegExp value</code>) : MixedCollection</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Filter the <i>objects</i> in this collection by a specific property.
Returns a new collection that has been filtered.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#filterBy">filterBy</a>(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : MixedCollection</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Filter by a function. * Returns a new collection that has been filtered.
The passed function will be called with each...</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#find">find</a>(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns the first item in the collection which elicits a true return value from the
passed selection function.</td>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#fireEvent">fireEvent</a>(<code>String eventName</code>, <code>Object... args</code>) : Boolean</td>
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#fireEvent">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Fires the specified event with the passed parameters (minus the event name).</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#first">first</a>() : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns the first item in the collection.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#get">get</a>(<code>String/Number key</code>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Returns the item associated with the passed key or index.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#getCount">getCount</a>() : Number</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns the number of items in the collection.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#getKey">getKey</a>(<code>o {Object}</code>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">MixedCollection has a generic way to fetch keys if you implement getKey.
// normal way
var mc = new E...</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#getRange">getRange</a>(<span class="optional" title="Optional">[<code>Number startIndex</code>]</span>, <span class="optional" title="Optional">[<code>Number endIndex</code>]</span>) : Array</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns a range of items in this collection</td>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#hasListener">hasListener</a>(<code>String eventName</code>) : Boolean</td>
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#hasListener">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Checks to see if this object is currently listening for a specified event</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#indexOf">indexOf</a>(<code>Object o</code>) : Number</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns index within the collection of the passed Object.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#indexOfKey">indexOfKey</a>(<code>String key</code>) : Number</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Returns index within the collection of the passed key.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#insert">insert</a>(<code>Number index</code>, <code>String key</code>, <span class="optional" title="Optional">[<code>Object o</code>]</span>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Inserts an item at the specified index in the collection.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#item">item</a>(<code>String/Number key</code>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Returns the item associated with the passed key OR index. Key has priority over index.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#itemAt">itemAt</a>(<code>Number index</code>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns the item at the specified index.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#key">key</a>(<code>String/Number key</code>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Returns the item associated with the passed key.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#keySort">keySort</a>(<span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>) : void</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Sorts this collection by keys</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#last">last</a>() : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Returns the last item in the collection.</td>
</tr>
<tr class="alt">
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#on">on</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object options</code>]</span>) : void</td>
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#on">Observable</a></td>
</tr>
<tr class="alt">
<td class="mdesc">Appends an event handler to this element (shorthand for addListener)</td>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#purgeListeners">purgeListeners</a>() : void</td>
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#purgeListeners">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Removes all listeners for this object</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#remove">remove</a>(<code>Object o</code>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Removed an item from the collection.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#removeAt">removeAt</a>(<code>Number index</code>) : void</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Remove an item from a specified index in the collection.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#removeKey">removeKey</a>(<code>String key</code>) : void</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Removed an item associated with the passed key fom the collection.</td>
</tr>
<tr>
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#removeListener">removeListener</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : void</td>
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#removeListener">Observable</a></td>
</tr>
<tr>
<td class="mdesc">Removes a listener</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#replace">replace</a>(<code>String key</code>, <span class="optional" title="Optional">[<code>o {Object}</code>]</span>) : Object</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Replaces an item in the collection.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#sort">sort</a>(<span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>) : void</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Sorts this collection with the passed comparison function</td>
</tr>
<tr class="alt">
<td class="micon inherited" title="Inherited" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#un">un</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : void</td>
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#un">Observable</a></td>
</tr>
<tr class="alt">
<td class="mdesc">Removes a listener (shorthand for removeListener)</td>
</tr>
</table>
<a name="events"></a>
<h2>Public Events</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Event</th>
<th class="msource-header">Defined By</th>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-add">add</a> : (<code>Number index</code>, <code>Object o</code>, <code>String key</code>)</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Fires when an item is added to the collection.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-clear">clear</a> : ()</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Fires when the collection is cleared.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-remove">remove</a> : (<code>Object o</code>, <span class="optional" title="Optional">[<code>String key</code>]</span>)</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr>
<td class="mdesc">Fires when an item is removed from the collection.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-replace">replace</a> : (<code>String key</code>, <code>Object old</code>, <code>Object new</code>)</td>
<td class="msource" rowspan="2">MixedCollection</td>
</tr>
<tr class="alt">
<td class="mdesc">Fires when an item is replaced in the collection.</td>
</tr>
</table>
<a name="MixedCollection"></a>
<h2 class="mdetail-head">Constructor Details</h2>
<div class="detail-wrap">
<div class="mdetail">
<h3>MixedCollection</i></h3>
<code>public function MixedCollection(<code>Boolean allowFunctions</code>, <code>Function keyFn</code>)</code>
<div class="mdetail-desc">
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>allowFunctions</code> : Boolean<div class="sub-desc">True if the addAll function should add function references to the collection (defaults to false)</div></li><li><code>keyFn</code> : Function<div class="sub-desc">A function that can accept an item of the type(s) stored in this MixedCollection and return the key value for that item. This is used when available to look up the key on items that were passed without an explicit key parameter to a MixedCollection method. Passing this parameter is equivalent to providing an implementation for the <a href="#getKey">getKey</a> method.</div></li> </ul>
</div>
</div>
</div>
</div>
<h2 class="mdetail-head">Method Details</h2>
<div class="detail-wrap">
<a name="add"></a>
<div class="mdetail">
<h3>add</i></h3>
<code>public function add(<code>String key</code>, <code>Object o</code>)</code>
<div class="mdetail-desc">
Adds an item to the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>key</code> : String<div class="sub-desc">The key to associate with the item</div></li><li><code>o</code> : Object<div class="sub-desc">The item to add.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The item added.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="addAll"></a>
<div class="mdetail alt">
<h3>addAll</i></h3>
<code>public function addAll(<code>Object/Array objs</code>)</code>
<div class="mdetail-desc">
Adds all elements of an Array or an Object to the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>objs</code> : Object/Array<div class="sub-desc">An Object containing properties which will be added to the collection, or an Array of values, each of which are added to the collection.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="addEvents"></a>
<div class="mdetail">
<h3>addEvents</i></h3>
<code>public function addEvents(<code>Object object</code>)</code>
<div class="mdetail-desc">
Copies any events from the passed object onto this object if they do not already exist. The passed object
must also inherit from Observable for this method to have any effect.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>object</code> : Object<div class="sub-desc">The object from which to copy events</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#addEvents">Observable</a>.</div>
</div>
<a name="addListener"></a>
<div class="mdetail alt">
<h3>addListener</i></h3>
<code>public function addListener(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>)</code>
<div class="mdetail-desc">
Appends an event handler to this component
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration properties. This may contain any of the following properties:<ul> <li>scope {Object} The scope in which to execute the handler function. The handler function's "this" context.</li> <li>delegate {String} A simple selector to filter the target or look for a descendant of the target</li> <li>stopEvent {Boolean} True to stop the event. That is stop propagation, and prevent the default action.</li> <li>preventDefault {Boolean} True to prevent the default action</li> <li>stopPropagation {Boolean} True to prevent event propagation</li> <li>normalized {Boolean} False to pass a browser event to the handler function instead of an Ext.EventObject</li> <li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li> <li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li> <li>buffer {Number} Causes the handler to be scheduled to run in an <a href="Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed by the specified number of milliseconds. If the event fires again within that time, the original handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li> </ul> <p> <b>Combining Options</b><br> Using the options argument, it is possible to combine different types of listeners:<br> <br> A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<div style="margin: 5px 20px 20px;"> Code: <pre><code>el.on('click', this.onClick, this, { single: true, delay: 100, stopEvent : true, forumId: 4 });</pre> <p> The method also allows for a single argument to be passed which is a config object containing properties which specify multiple handlers. <p> <b>Attaching multiple handlers in 1 call</b><br> Code: <pre><code>el.on({ 'click' : { fn: this.onClick scope: this, delay: 100 }, 'mouseover' : { fn: this.onMouseOver scope: this }, 'mouseout' : { fn: this.onMouseOut scope: this } });</pre> <p> Or a shorthand syntax:<br> Code: <pre><code>el.on({ 'click' : this.onClick, 'mouseover' : this.onMouseOver, 'mouseout' : this.onMouseOut scope: this });</pre></div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#addListener">Observable</a>.</div>
</div>
<a name="clear"></a>
<div class="mdetail">
<h3>clear</i></h3>
<code>public function clear()</code>
<div class="mdetail-desc">
Removes all items from the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="clone"></a>
<div class="mdetail alt">
<h3>clone</i></h3>
<code>public function clone()</code>
<div class="mdetail-desc">
Creates a duplicate of this collection
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>MixedCollection</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="contains"></a>
<div class="mdetail">
<h3>contains</i></h3>
<code>public function contains(<code>Object o</code>)</code>
<div class="mdetail-desc">
Returns true if the collection contains the passed Object as an item.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>o</code> : Object<div class="sub-desc">The Object to look for in the collection.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">True if the collection contains the Object as an item.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="containsKey"></a>
<div class="mdetail alt">
<h3>containsKey</i></h3>
<code>public function containsKey(<code>String key</code>)</code>
<div class="mdetail-desc">
Returns true if the collection contains the passed Object as a key.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>key</code> : String<div class="sub-desc">The key to look for in the collection.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">True if the collection contains the Object as a key.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="each"></a>
<div class="mdetail">
<h3>each</i></h3>
<code>public function each(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
<div class="mdetail-desc">
Executes the specified function once for every item in the collection, passing each
item as the first and only parameter. returning false from the function will stop the iteration.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>fn</code> : Function<div class="sub-desc">The function to execute for each item.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the function.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="eachKey"></a>
<div class="mdetail alt">
<h3>eachKey</i></h3>
<code>public function eachKey(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
<div class="mdetail-desc">
Executes the specified function once for every key in the collection, passing each
key, and its associated item as the first two parameters.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>fn</code> : Function<div class="sub-desc">The function to execute for each item.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the function.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="filter"></a>
<div class="mdetail">
<h3>filter</i></h3>
<code>public function filter(<code>String property</code>, <code>String/RegExp value</code>)</code>
<div class="mdetail-desc">
Filter the <i>objects</i> in this collection by a specific property.
Returns a new collection that has been filtered.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>property</code> : String<div class="sub-desc">A property on your objects</div></li><li><code>value</code> : String/RegExp<div class="sub-desc">Either string that the property values should start with or a RegExp to test against the property</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>MixedCollection</code><div class="sub-desc">The new filtered collection</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="filterBy"></a>
<div class="mdetail alt">
<h3>filterBy</i></h3>
<code>public function filterBy(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
<div class="mdetail-desc">
Filter by a function. * Returns a new collection that has been filtered.
The passed function will be called with each
object in the collection. If the function returns true, the value is included
otherwise it is filtered.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>fn</code> : Function<div class="sub-desc">The function to be called, it will receive the args o (the object), k (the key)</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the function (defaults to this)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>MixedCollection</code><div class="sub-desc">The new filtered collection</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="find"></a>
<div class="mdetail">
<h3>find</i></h3>
<code>public function find(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
<div class="mdetail-desc">
Returns the first item in the collection which elicits a true return value from the
passed selection function.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>fn</code> : Function<div class="sub-desc">The selection function to execute for each item.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the function.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The first item in the collection which returned true from the selection function.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="fireEvent"></a>
<div class="mdetail alt">
<h3>fireEvent</i></h3>
<code>public function fireEvent(<code>String eventName</code>, <code>Object... args</code>)</code>
<div class="mdetail-desc">
Fires the specified event with the passed parameters (minus the event name).
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#fireEvent">Observable</a>.</div>
</div>
<a name="first"></a>
<div class="mdetail">
<h3>first</i></h3>
<code>public function first()</code>
<div class="mdetail-desc">
Returns the first item in the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">the first item in the collection..</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="get"></a>
<div class="mdetail alt">
<h3>get</i></h3>
<code>public function get(<code>String/Number key</code>)</code>
<div class="mdetail-desc">
Returns the item associated with the passed key or index.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>key</code> : String/Number<div class="sub-desc">The key or index of the item.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="getCount"></a>
<div class="mdetail">
<h3>getCount</i></h3>
<code>public function getCount()</code>
<div class="mdetail-desc">
Returns the number of items in the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code><div class="sub-desc">the number of items in the collection.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="getKey"></a>
<div class="mdetail alt">
<h3>getKey</i></h3>
<code>public function getKey(<code>o {Object}</code>)</code>
<div class="mdetail-desc">
MixedCollection has a generic way to fetch keys if you implement getKey.
<pre><code>
// normal way
var mc = new Ext.util.MixedCollection();
mc.add(someEl.dom.id, someEl);
mc.add(otherEl.dom.id, otherEl);
//and so on
// using getKey
var mc = new Ext.util.MixedCollection();
mc.getKey = function(el){
return el.dom.id;
}
mc.add(someEl);
mc.add(otherEl);
// etc
</code>
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>{Object}</code> : o<div class="sub-desc">The item for which to find the key.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The key for the passed item.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="getRange"></a>
<div class="mdetail">
<h3>getRange</i></h3>
<code>public function getRange(<span class="optional" title="Optional">[<code>Number startIndex</code>]</span>, <span class="optional" title="Optional">[<code>Number endIndex</code>]</span>)</code>
<div class="mdetail-desc">
Returns a range of items in this collection
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>startIndex</code> : Number<div class="sub-desc">(optional) defaults to 0</div></li><li><code>endIndex</code> : Number<div class="sub-desc">(optional) default to the last item</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Array</code><div class="sub-desc">An array of items</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="hasListener"></a>
<div class="mdetail alt">
<h3>hasListener</i></h3>
<code>public function hasListener(<code>String eventName</code>)</code>
<div class="mdetail-desc">
Checks to see if this object is currently listening for a specified event
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#hasListener">Observable</a>.</div>
</div>
<a name="indexOf"></a>
<div class="mdetail">
<h3>indexOf</i></h3>
<code>public function indexOf(<code>Object o</code>)</code>
<div class="mdetail-desc">
Returns index within the collection of the passed Object.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>o</code> : Object<div class="sub-desc">The item to find the index of.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code><div class="sub-desc">index of the item.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="indexOfKey"></a>
<div class="mdetail alt">
<h3>indexOfKey</i></h3>
<code>public function indexOfKey(<code>String key</code>)</code>
<div class="mdetail-desc">
Returns index within the collection of the passed key.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>key</code> : String<div class="sub-desc">The key to find the index of.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code><div class="sub-desc">index of the key.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="insert"></a>
<div class="mdetail">
<h3>insert</i></h3>
<code>public function insert(<code>Number index</code>, <code>String key</code>, <span class="optional" title="Optional">[<code>Object o</code>]</span>)</code>
<div class="mdetail-desc">
Inserts an item at the specified index in the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>index</code> : Number<div class="sub-desc">The index to insert the item at.</div></li><li><code>key</code> : String<div class="sub-desc">The key to associate with the new item, or the item itself.</div></li><li><code>o</code> : Object<div class="sub-desc">(optional) If the second parameter was a key, the new item.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The item inserted.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="item"></a>
<div class="mdetail alt">
<h3>item</i></h3>
<code>public function item(<code>String/Number key</code>)</code>
<div class="mdetail-desc">
Returns the item associated with the passed key OR index. Key has priority over index.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>key</code> : String/Number<div class="sub-desc">The key or index of the item.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="itemAt"></a>
<div class="mdetail">
<h3>itemAt</i></h3>
<code>public function itemAt(<code>Number index</code>)</code>
<div class="mdetail-desc">
Returns the item at the specified index.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>index</code> : Number<div class="sub-desc">The index of the item.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="key"></a>
<div class="mdetail alt">
<h3>key</i></h3>
<code>public function key(<code>String/Number key</code>)</code>
<div class="mdetail-desc">
Returns the item associated with the passed key.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>key</code> : String/Number<div class="sub-desc">The key of the item.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="keySort"></a>
<div class="mdetail">
<h3>keySort</i></h3>
<code>public function keySort(<span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>)</code>
<div class="mdetail-desc">
Sorts this collection by keys
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>direction</code> : String<div class="sub-desc">(optional) "ASC" or "DESC"</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) a comparison function (defaults to case insensitive string)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="last"></a>
<div class="mdetail alt">
<h3>last</i></h3>
<code>public function last()</code>
<div class="mdetail-desc">
Returns the last item in the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">the last item in the collection..</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="on"></a>
<div class="mdetail">
<h3>on</i></h3>
<code>public function on(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object options</code>]</span>)</code>
<div class="mdetail-desc">
Appends an event handler to this element (shorthand for addListener)
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#on">Observable</a>.</div>
</div>
<a name="purgeListeners"></a>
<div class="mdetail alt">
<h3>purgeListeners</i></h3>
<code>public function purgeListeners()</code>
<div class="mdetail-desc">
Removes all listeners for this object
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#purgeListeners">Observable</a>.</div>
</div>
<a name="remove"></a>
<div class="mdetail">
<h3>remove</i></h3>
<code>public function remove(<code>Object o</code>)</code>
<div class="mdetail-desc">
Removed an item from the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>o</code> : Object<div class="sub-desc">The item to remove.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The item removed.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="removeAt"></a>
<div class="mdetail alt">
<h3>removeAt</i></h3>
<code>public function removeAt(<code>Number index</code>)</code>
<div class="mdetail-desc">
Remove an item from a specified index in the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>index</code> : Number<div class="sub-desc">The index within the collection of the item to remove.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="removeKey"></a>
<div class="mdetail">
<h3>removeKey</i></h3>
<code>public function removeKey(<code>String key</code>)</code>
<div class="mdetail-desc">
Removed an item associated with the passed key fom the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>key</code> : String<div class="sub-desc">The key of the item to remove.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="removeListener"></a>
<div class="mdetail alt">
<h3>removeListener</i></h3>
<code>public function removeListener(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
<div class="mdetail-desc">
Removes a listener
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#removeListener">Observable</a>.</div>
</div>
<a name="replace"></a>
<div class="mdetail">
<h3>replace</i></h3>
<code>public function replace(<code>String key</code>, <span class="optional" title="Optional">[<code>o {Object}</code>]</span>)</code>
<div class="mdetail-desc">
Replaces an item in the collection.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>key</code> : String<div class="sub-desc">The key associated with the item to replace, or the item to replace.</div></li><li><code>{Object}</code> : o<div class="sub-desc">o (optional) If the first parameter passed was a key, the item to associate with that key.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The new item.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="sort"></a>
<div class="mdetail alt">
<h3>sort</i></h3>
<code>public function sort(<span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>)</code>
<div class="mdetail-desc">
Sorts this collection with the passed comparison function
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>direction</code> : String<div class="sub-desc">(optional) "ASC" or "DESC"</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) comparison function</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by MixedCollection.</div>
</div>
<a name="un"></a>
<div class="mdetail">
<h3>un</i></h3>
<code>public function un(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
<div class="mdetail-desc">
Removes a listener (shorthand for removeListener)
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#un">Observable</a>.</div>
</div>
</div>
<h2 class="mdetail-head">Event Details</h2>
<div class="detail-wrap">
<a name="event-add"></a>
<div class="mdetail">
<h3>add</i></h3>
<code>public event add</code>
<div class="mdetail-desc">
Fires when an item is added to the collection.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li><code>index</code> : Number<div class="sub-desc">The index at which the item was added.</div></li><li><code>o</code> : Object<div class="sub-desc">The item added.</div></li><li><code>key</code> : String<div class="sub-desc">The key associated with the added item.</div></li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by MixedCollection.</div>
</div>
<a name="event-clear"></a>
<div class="mdetail alt">
<h3>clear</i></h3>
<code>public event clear</code>
<div class="mdetail-desc">
Fires when the collection is cleared.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li>None.</li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by MixedCollection.</div>
</div>
<a name="event-remove"></a>
<div class="mdetail">
<h3>remove</i></h3>
<code>public event remove</code>
<div class="mdetail-desc">
Fires when an item is removed from the collection.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li><code>o</code> : Object<div class="sub-desc">The item being removed.</div></li><li><code>key</code> : String<div class="sub-desc">(optional) The key associated with the removed item.</div></li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by MixedCollection.</div>
</div>
<a name="event-replace"></a>
<div class="mdetail alt">
<h3>replace</i></h3>
<code>public event replace</code>
<div class="mdetail-desc">
Fires when an item is replaced in the collection.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li><code>key</code> : String<div class="sub-desc">he key associated with the new added.</div></li><li><code>old</code> : Object<div class="sub-desc">The item being replaced.</div></li><li><code>new</code> : Object<div class="sub-desc">The new item.</div></li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by MixedCollection.</div>
</div>
</div>
</div>
<hr>
<div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright &copy; 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
</body>
</html>