1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.util.MixedCollection-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.util.MixedCollection-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.util.MixedCollection-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="inner-link" href="#Ext.util.MixedCollection-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7 <a class="bookmark" href="../docs/?class=Ext.util.MixedCollection"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
9 <div class="inheritance res-block">
10 <pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
11 <img src="resources/elbow-end.gif"/>MixedCollection</pre></div>
12 <h1>Class Ext.util.MixedCollection</h1>
13 <table cellspacing="0">
14 <tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr>
15 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/MixedCollection.js" target="_blank">MixedCollection.js</a></td></tr>
16 <tr><td class="label">Class:</td><td class="hd-info">MixedCollection</td></tr>
17 <tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.StoreMgr" href="output/Ext.StoreMgr.html">StoreMgr</a></td></tr>
18 <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>
20 <div class="description">
22 A Collection class that maintains both numeric indexes and keys and exposes events. </div>
24 <div class="hr"></div>
25 <a id="Ext.util.MixedCollection-configs"></a>
26 <h2>Config Options</h2>
27 <table cellspacing="0" class="member-table">
29 <th class="sig-header" colspan="2">Config Options</th>
30 <th class="msource-header">Defined By</th>
32 <tr class="config-row inherited expandable">
\r
33 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
35 <a id="Ext.util.MixedCollection-listeners"></a>
\r
36 <b>listeners</b> : Object <div class="mdesc">
\r
37 <div class="short">(optional) A config object containing one or more event handlers to be added to this object during initialization. Th...</div>
\r
39 (optional) A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once. </div>
\r
42 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
\r
45 <a id="Ext.util.MixedCollection-props"></a>
46 <h2>Public Properties</h2>
47 <div class="no-members">This class has no public properties.</div> <a id="Ext.util.MixedCollection-methods"></a>
48 <h2>Public Methods</h2>
49 <table cellspacing="0" class="member-table">
51 <th class="sig-header" colspan="2">Method</th>
52 <th class="msource-header">Defined By</th>
54 <tr class="method-row expandable">
\r
55 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
57 <a id="Ext.util.MixedCollection-MixedCollection"></a>
\r
58 <b>MixedCollection</b>( <code>Boolean allowFunctions</code>, <code>Function keyFn</code> ) <div class="mdesc">
\r
59 <div class="short"></div>
\r
61 <div class="mdetail-params">
\r
62 <strong>Parameters:</strong>
\r
63 <ul><li><code>allowFunctions</code> : Boolean<div class="sub-desc">True if the addAll function should add function references to the
64 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
65 and return the key value for that item. This is used when available to look up the key on items that
66 were passed without an explicit key parameter to a MixedCollection method. Passing this parameter is
67 equivalent to providing an implementation for the <a ext:cls="Ext.util.MixedCollection" ext:member="getKey" href="output/Ext.util.MixedCollection.html#getKey">getKey</a> method.</div></li> </ul>
\r
68 <strong>Returns:</strong>
\r
70 <li><code></code></li>
\r
76 <td class="msource">MixedCollection</td>
\r
78 <tr class="method-row alt expandable">
\r
79 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
81 <a id="Ext.util.MixedCollection-add"></a>
\r
82 <b>add</b>( <code>String key</code>, <code>Object o</code> ) : Object <div class="mdesc">
\r
83 <div class="short">Adds an item to the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete.</div>
\r
85 Adds an item to the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete. <div class="mdetail-params">
\r
86 <strong>Parameters:</strong>
\r
87 <ul><li><code>key</code> : String<div class="sub-desc"><p>The key to associate with the item, or the new item.</p>
88 <p>If you supplied a <a ext:cls="Ext.util.MixedCollection" ext:member="getKey" href="output/Ext.util.MixedCollection.html#getKey">getKey</a> implementation for this MixedCollection, or if the key
89 of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
90 will be able to <i>derive</i> the key for the new item. In this case just pass the new item in
91 this parameter.</p></div></li><li><code>o</code> : Object<div class="sub-desc">The item to add.</div></li> </ul>
\r
92 <strong>Returns:</strong>
\r
94 <li><code>Object</code><div class="sub-desc">The item added.</div></li>
\r
100 <td class="msource">MixedCollection</td>
\r
102 <tr class="method-row expandable">
\r
103 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
105 <a id="Ext.util.MixedCollection-addAll"></a>
\r
106 <b>addAll</b>( <code>Object/Array objs</code> ) : void <div class="mdesc">
\r
107 <div class="short">Adds all elements of an Array or an Object to the collection.</div>
\r
109 Adds all elements of an Array or an Object to the collection. <div class="mdetail-params">
\r
110 <strong>Parameters:</strong>
\r
111 <ul><li><code>objs</code> : Object/Array<div class="sub-desc">An Object containing properties which will be added to the collection, or
112 an Array of values, each of which are added to the collection.</div></li> </ul>
\r
113 <strong>Returns:</strong>
\r
115 <li><code>void</code></li>
\r
121 <td class="msource">MixedCollection</td>
\r
123 <tr class="method-row inherited alt expandable">
\r
124 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
126 <a id="Ext.util.MixedCollection-addEvents"></a>
\r
127 <b>addEvents</b>( <code>Object object</code> ) : void <div class="mdesc">
\r
128 <div class="short">Used to define events on this Observable</div>
\r
130 Used to define events on this Observable <div class="mdetail-params">
\r
131 <strong>Parameters:</strong>
\r
132 <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul>
\r
133 <strong>Returns:</strong>
\r
135 <li><code>void</code></li>
\r
141 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
\r
143 <tr class="method-row inherited expandable">
\r
144 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
146 <a id="Ext.util.MixedCollection-addListener"></a>
\r
147 <b>addListener</b>( <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 <div class="mdesc">
\r
148 <div class="short">Appends an event handler to this component</div>
\r
150 Appends an event handler to this component <div class="mdetail-params">
\r
151 <strong>Parameters:</strong>
\r
152 <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
153 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
154 properties. This may contain any of the following properties:<ul>
155 <li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
156 <li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
157 <li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
158 <li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
159 by the specified number of milliseconds. If the event fires again within that time, the original
160 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
163 <b>Combining Options</b><br>
164 Using the options argument, it is possible to combine different types of listeners:<br>
166 A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
167 <pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
173 <b>Attaching multiple handlers in 1 call</b><br>
174 The method also allows for a single argument to be passed which is a config object containing properties
175 which specify multiple handlers.
179 fn: <b>this</b>.onClick,
183 <em>'mouseover'</em> : {
184 fn: <b>this</b>.onMouseOver,
187 <em>'mouseout'</em> : {
188 fn: <b>this</b>.onMouseOut,
193 Or a shorthand syntax:<br>
195 <em>'click'</em> : <b>this</b>.onClick,
196 <em>'mouseover'</em> : <b>this</b>.onMouseOver,
197 <em>'mouseout'</em> : <b>this</b>.onMouseOut,
199 });</code></pre></div></li> </ul>
\r
200 <strong>Returns:</strong>
\r
202 <li><code>void</code></li>
\r
208 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
\r
210 <tr class="method-row alt expandable">
\r
211 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
213 <a id="Ext.util.MixedCollection-clear"></a>
\r
214 <b>clear</b>() : void <div class="mdesc">
\r
215 <div class="short">Removes all items from the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="clear" href="output/Ext.util.MixedCollection.html#clear">clear</a> event when complete.</div>
\r
217 Removes all items from the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="clear" href="output/Ext.util.MixedCollection.html#clear">clear</a> event when complete. <div class="mdetail-params">
\r
218 <strong>Parameters:</strong>
\r
219 <ul><li>None.</li> </ul>
\r
220 <strong>Returns:</strong>
\r
222 <li><code>void</code></li>
\r
228 <td class="msource">MixedCollection</td>
\r
230 <tr class="method-row expandable">
\r
231 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
233 <a id="Ext.util.MixedCollection-clone"></a>
\r
234 <b>clone</b>() : MixedCollection <div class="mdesc">
\r
235 <div class="short">Creates a shallow copy of this collection</div>
\r
237 Creates a shallow copy of this collection <div class="mdetail-params">
\r
238 <strong>Parameters:</strong>
\r
239 <ul><li>None.</li> </ul>
\r
240 <strong>Returns:</strong>
\r
242 <li><code>MixedCollection</code></li>
\r
248 <td class="msource">MixedCollection</td>
\r
250 <tr class="method-row alt expandable">
\r
251 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
253 <a id="Ext.util.MixedCollection-contains"></a>
\r
254 <b>contains</b>( <code>Object o</code> ) : Boolean <div class="mdesc">
\r
255 <div class="short">Returns true if the collection contains the passed Object as an item.</div>
\r
257 Returns true if the collection contains the passed Object as an item. <div class="mdetail-params">
\r
258 <strong>Parameters:</strong>
\r
259 <ul><li><code>o</code> : Object<div class="sub-desc">The Object to look for in the collection.</div></li> </ul>
\r
260 <strong>Returns:</strong>
\r
262 <li><code>Boolean</code><div class="sub-desc">True if the collection contains the Object as an item.</div></li>
\r
268 <td class="msource">MixedCollection</td>
\r
270 <tr class="method-row expandable">
\r
271 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
273 <a id="Ext.util.MixedCollection-containsKey"></a>
\r
274 <b>containsKey</b>( <code>String key</code> ) : Boolean <div class="mdesc">
\r
275 <div class="short">Returns true if the collection contains the passed Object as a key.</div>
\r
277 Returns true if the collection contains the passed Object as a key. <div class="mdetail-params">
\r
278 <strong>Parameters:</strong>
\r
279 <ul><li><code>key</code> : String<div class="sub-desc">The key to look for in the collection.</div></li> </ul>
\r
280 <strong>Returns:</strong>
\r
282 <li><code>Boolean</code><div class="sub-desc">True if the collection contains the Object as a key.</div></li>
\r
288 <td class="msource">MixedCollection</td>
\r
290 <tr class="method-row alt expandable">
\r
291 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
293 <a id="Ext.util.MixedCollection-each"></a>
\r
294 <b>each</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
295 <div class="short">Executes the specified function once for every item in the collection, passing the following arguments:
297 item : Mixed...</div>
\r
299 Executes the specified function once for every item in the collection, passing the following arguments:
300 <div class="mdetail-params"><ul>
301 <li><b>item</b> : Mixed<p class="sub-desc">The collection item</p></li>
302 <li><b>index</b> : Number<p class="sub-desc">The item's index</p></li>
303 <li><b>length</b> : Number<p class="sub-desc">The total number of items in the collection</p></li>
305 The function should return a boolean value. Returning false from the function will stop the iteration. <div class="mdetail-params">
\r
306 <strong>Parameters:</strong>
\r
307 <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>
\r
308 <strong>Returns:</strong>
\r
310 <li><code>void</code></li>
\r
316 <td class="msource">MixedCollection</td>
\r
318 <tr class="method-row expandable">
\r
319 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
321 <a id="Ext.util.MixedCollection-eachKey"></a>
\r
322 <b>eachKey</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
323 <div class="short">Executes the specified function once for every key in the collection, passing each
324 key, and its associated item as th...</div>
\r
326 Executes the specified function once for every key in the collection, passing each
327 key, and its associated item as the first two parameters. <div class="mdetail-params">
\r
328 <strong>Parameters:</strong>
\r
329 <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>
\r
330 <strong>Returns:</strong>
\r
332 <li><code>void</code></li>
\r
338 <td class="msource">MixedCollection</td>
\r
340 <tr class="method-row alt expandable">
\r
341 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
343 <a id="Ext.util.MixedCollection-filter"></a>
\r
344 <b>filter</b>( <code>String property</code>, <code>String/RegExp value</code>, <span class="optional" title="Optional">[<code>Boolean anyMatch</code>]</span>, <span class="optional" title="Optional">[<code>Boolean caseSensitive</code>]</span> ) : MixedCollection <div class="mdesc">
\r
345 <div class="short">Filter the <i>objects</i> in this collection by a specific property.
346 Returns a new collection that has been filtered.</div>
\r
348 Filter the <i>objects</i> in this collection by a specific property.
349 Returns a new collection that has been filtered. <div class="mdetail-params">
\r
350 <strong>Parameters:</strong>
\r
351 <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
352 should start with or a RegExp to test against the property</div></li><li><code>anyMatch</code> : Boolean<div class="sub-desc">(optional) True to match any part of the string, not just the beginning</div></li><li><code>caseSensitive</code> : Boolean<div class="sub-desc">(optional) True for case sensitive comparison (defaults to False).</div></li> </ul>
\r
353 <strong>Returns:</strong>
\r
355 <li><code>MixedCollection</code><div class="sub-desc">The new filtered collection</div></li>
\r
361 <td class="msource">MixedCollection</td>
\r
363 <tr class="method-row expandable">
\r
364 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
366 <a id="Ext.util.MixedCollection-filterBy"></a>
\r
367 <b>filterBy</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : MixedCollection <div class="mdesc">
\r
368 <div class="short">Filter by a function. Returns a new collection that has been filtered.
369 The passed function will be called with each o...</div>
\r
371 Filter by a function. Returns a <i>new</i> collection that has been filtered.
372 The passed function will be called with each object in the collection.
373 If the function returns true, the value is included otherwise it is filtered. <div class="mdetail-params">
\r
374 <strong>Parameters:</strong>
\r
375 <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>
\r
376 <strong>Returns:</strong>
\r
378 <li><code>MixedCollection</code><div class="sub-desc">The new filtered collection</div></li>
\r
384 <td class="msource">MixedCollection</td>
\r
386 <tr class="method-row alt expandable">
\r
387 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
389 <a id="Ext.util.MixedCollection-find"></a>
\r
390 <b>find</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : Object <div class="mdesc">
\r
391 <div class="short">Returns the first item in the collection which elicits a true return value from the
392 passed selection function.</div>
\r
394 Returns the first item in the collection which elicits a true return value from the
395 passed selection function. <div class="mdetail-params">
\r
396 <strong>Parameters:</strong>
\r
397 <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>
\r
398 <strong>Returns:</strong>
\r
400 <li><code>Object</code><div class="sub-desc">The first item in the collection which returned true from the selection function.</div></li>
\r
406 <td class="msource">MixedCollection</td>
\r
408 <tr class="method-row expandable">
\r
409 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
411 <a id="Ext.util.MixedCollection-findIndex"></a>
\r
412 <b>findIndex</b>( <code>String property</code>, <code>String/RegExp value</code>, <span class="optional" title="Optional">[<code>Number start</code>]</span>, <span class="optional" title="Optional">[<code>Boolean anyMatch</code>]</span>, <span class="optional" title="Optional">[<code>Boolean caseSensitive</code>]</span> ) : Number <div class="mdesc">
\r
413 <div class="short">Finds the index of the first matching object in this collection by a specific property/value.</div>
\r
415 Finds the index of the first matching object in this collection by a specific property/value. <div class="mdetail-params">
\r
416 <strong>Parameters:</strong>
\r
417 <ul><li><code>property</code> : String<div class="sub-desc">The name of a property on your objects.</div></li><li><code>value</code> : String/RegExp<div class="sub-desc">A string that the property values
418 should start with or a RegExp to test against the property.</div></li><li><code>start</code> : Number<div class="sub-desc">(optional) The index to start searching at (defaults to 0).</div></li><li><code>anyMatch</code> : Boolean<div class="sub-desc">(optional) True to match any part of the string, not just the beginning.</div></li><li><code>caseSensitive</code> : Boolean<div class="sub-desc">(optional) True for case sensitive comparison.</div></li> </ul>
\r
419 <strong>Returns:</strong>
\r
421 <li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>
\r
427 <td class="msource">MixedCollection</td>
\r
429 <tr class="method-row alt expandable">
\r
430 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
432 <a id="Ext.util.MixedCollection-findIndexBy"></a>
\r
433 <b>findIndexBy</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Number start</code>]</span> ) : Number <div class="mdesc">
\r
434 <div class="short">Find the index of the first matching object in this collection by a function.
435 If the function returns true it is cons...</div>
\r
437 Find the index of the first matching object in this collection by a function.
438 If the function returns <i>true</i> it is considered a match. <div class="mdetail-params">
\r
439 <strong>Parameters:</strong>
\r
440 <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><li><code>start</code> : Number<div class="sub-desc">(optional) The index to start searching at (defaults to 0).</div></li> </ul>
\r
441 <strong>Returns:</strong>
\r
443 <li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>
\r
449 <td class="msource">MixedCollection</td>
\r
451 <tr class="method-row inherited expandable">
\r
452 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
454 <a id="Ext.util.MixedCollection-fireEvent"></a>
\r
455 <b>fireEvent</b>( <code>String eventName</code>, <code>Object... args</code> ) : Boolean <div class="mdesc">
\r
456 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
\r
458 Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params">
\r
459 <strong>Parameters:</strong>
\r
460 <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>
\r
461 <strong>Returns:</strong>
\r
463 <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
\r
469 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
\r
471 <tr class="method-row alt expandable">
\r
472 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
474 <a id="Ext.util.MixedCollection-first"></a>
\r
475 <b>first</b>() : Object <div class="mdesc">
\r
476 <div class="short">Returns the first item in the collection.</div>
\r
478 Returns the first item in the collection. <div class="mdetail-params">
\r
479 <strong>Parameters:</strong>
\r
480 <ul><li>None.</li> </ul>
\r
481 <strong>Returns:</strong>
\r
483 <li><code>Object</code><div class="sub-desc">the first item in the collection..</div></li>
\r
489 <td class="msource">MixedCollection</td>
\r
491 <tr class="method-row expandable">
\r
492 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
494 <a id="Ext.util.MixedCollection-get"></a>
\r
495 <b>get</b>( <code>String/Number key</code> ) : Object <div class="mdesc">
\r
496 <div class="short">Returns the item associated with the passed key or index.</div>
\r
498 Returns the item associated with the passed key or index. <div class="mdetail-params">
\r
499 <strong>Parameters:</strong>
\r
500 <ul><li><code>key</code> : String/Number<div class="sub-desc">The key or index of the item.</div></li> </ul>
\r
501 <strong>Returns:</strong>
\r
503 <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
\r
509 <td class="msource">MixedCollection</td>
\r
511 <tr class="method-row alt expandable">
\r
512 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
514 <a id="Ext.util.MixedCollection-getCount"></a>
\r
515 <b>getCount</b>() : Number <div class="mdesc">
\r
516 <div class="short">Returns the number of items in the collection.</div>
\r
518 Returns the number of items in the collection. <div class="mdetail-params">
\r
519 <strong>Parameters:</strong>
\r
520 <ul><li>None.</li> </ul>
\r
521 <strong>Returns:</strong>
\r
523 <li><code>Number</code><div class="sub-desc">the number of items in the collection.</div></li>
\r
529 <td class="msource">MixedCollection</td>
\r
531 <tr class="method-row expandable">
\r
532 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
534 <a id="Ext.util.MixedCollection-getKey"></a>
\r
535 <b>getKey</b>( <code>Object item</code> ) : Object <div class="mdesc">
\r
536 <div class="short">MixedCollection has a generic way to fetch keys if you implement getKey. The default implementation
537 simply returns i...</div>
\r
539 MixedCollection has a generic way to fetch keys if you implement getKey. The default implementation
540 simply returns <tt style="font-weight:bold;">item.id</tt> but you can provide your own implementation
541 to return a different value as in the following examples:
\r
542 <pre><code><i>// normal way</i>
543 <b>var</b> mc = <b>new</b> Ext.util.MixedCollection();
544 mc.add(someEl.dom.id, someEl);
545 mc.add(otherEl.dom.id, otherEl);
548 <i>// using getKey</i>
549 <b>var</b> mc = <b>new</b> Ext.util.MixedCollection();
550 mc.getKey = <b>function</b>(el){
551 <b>return</b> el.dom.id;
556 <i>// or via the constructor</i>
557 <b>var</b> mc = <b>new</b> Ext.util.MixedCollection(false, <b>function</b>(el){
558 <b>return</b> el.dom.id;
561 mc.add(otherEl);</code></pre> <div class="mdetail-params">
\r
562 <strong>Parameters:</strong>
\r
563 <ul><li><code>item</code> : Object<div class="sub-desc">The item for which to find the key.</div></li> </ul>
\r
564 <strong>Returns:</strong>
\r
566 <li><code>Object</code><div class="sub-desc">The key for the passed item.</div></li>
\r
572 <td class="msource">MixedCollection</td>
\r
574 <tr class="method-row alt expandable">
\r
575 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
577 <a id="Ext.util.MixedCollection-getRange"></a>
\r
578 <b>getRange</b>( <span class="optional" title="Optional">[<code>Number startIndex</code>]</span>, <span class="optional" title="Optional">[<code>Number endIndex</code>]</span> ) : Array <div class="mdesc">
\r
579 <div class="short">Returns a range of items in this collection</div>
\r
581 Returns a range of items in this collection <div class="mdetail-params">
\r
582 <strong>Parameters:</strong>
\r
583 <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>
\r
584 <strong>Returns:</strong>
\r
586 <li><code>Array</code><div class="sub-desc">An array of items</div></li>
\r
592 <td class="msource">MixedCollection</td>
\r
594 <tr class="method-row inherited expandable">
\r
595 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
597 <a id="Ext.util.MixedCollection-hasListener"></a>
\r
598 <b>hasListener</b>( <code>String eventName</code> ) : Boolean <div class="mdesc">
\r
599 <div class="short">Checks to see if this object has any listeners for a specified event</div>
\r
601 Checks to see if this object has any listeners for a specified event <div class="mdetail-params">
\r
602 <strong>Parameters:</strong>
\r
603 <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
\r
604 <strong>Returns:</strong>
\r
606 <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
\r
612 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
\r
614 <tr class="method-row alt expandable">
\r
615 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
617 <a id="Ext.util.MixedCollection-indexOf"></a>
\r
618 <b>indexOf</b>( <code>Object o</code> ) : Number <div class="mdesc">
\r
619 <div class="short">Returns index within the collection of the passed Object.</div>
\r
621 Returns index within the collection of the passed Object. <div class="mdetail-params">
\r
622 <strong>Parameters:</strong>
\r
623 <ul><li><code>o</code> : Object<div class="sub-desc">The item to find the index of.</div></li> </ul>
\r
624 <strong>Returns:</strong>
\r
626 <li><code>Number</code><div class="sub-desc">index of the item. Returns -1 if not found.</div></li>
\r
632 <td class="msource">MixedCollection</td>
\r
634 <tr class="method-row expandable">
\r
635 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
637 <a id="Ext.util.MixedCollection-indexOfKey"></a>
\r
638 <b>indexOfKey</b>( <code>String key</code> ) : Number <div class="mdesc">
\r
639 <div class="short">Returns index within the collection of the passed key.</div>
\r
641 Returns index within the collection of the passed key. <div class="mdetail-params">
\r
642 <strong>Parameters:</strong>
\r
643 <ul><li><code>key</code> : String<div class="sub-desc">The key to find the index of.</div></li> </ul>
\r
644 <strong>Returns:</strong>
\r
646 <li><code>Number</code><div class="sub-desc">index of the key.</div></li>
\r
652 <td class="msource">MixedCollection</td>
\r
654 <tr class="method-row alt expandable">
\r
655 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
657 <a id="Ext.util.MixedCollection-insert"></a>
\r
658 <b>insert</b>( <code>Number index</code>, <code>String key</code>, <span class="optional" title="Optional">[<code>Object o</code>]</span> ) : Object <div class="mdesc">
\r
659 <div class="short">Inserts an item at the specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete.</div>
\r
661 Inserts an item at the specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete. <div class="mdetail-params">
\r
662 <strong>Parameters:</strong>
\r
663 <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>
\r
664 <strong>Returns:</strong>
\r
666 <li><code>Object</code><div class="sub-desc">The item inserted.</div></li>
\r
672 <td class="msource">MixedCollection</td>
\r
674 <tr class="method-row expandable">
\r
675 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
677 <a id="Ext.util.MixedCollection-item"></a>
\r
678 <b>item</b>( <code>String/Number key</code> ) : Object <div class="mdesc">
\r
679 <div class="short">Returns the item associated with the passed key OR index. Key has priority over index. This is the equivalent
682 Returns the item associated with the passed key OR index. Key has priority over index. This is the equivalent
683 of calling <a ext:cls="Ext.util.MixedCollection" ext:member="key" href="output/Ext.util.MixedCollection.html#key">key</a> first, then if nothing matched calling <a ext:cls="Ext.util.MixedCollection" ext:member="itemAt" href="output/Ext.util.MixedCollection.html#itemAt">itemAt</a>. <div class="mdetail-params">
\r
684 <strong>Parameters:</strong>
\r
685 <ul><li><code>key</code> : String/Number<div class="sub-desc">The key or index of the item.</div></li> </ul>
\r
686 <strong>Returns:</strong>
\r
688 <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
\r
694 <td class="msource">MixedCollection</td>
\r
696 <tr class="method-row alt expandable">
\r
697 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
699 <a id="Ext.util.MixedCollection-itemAt"></a>
\r
700 <b>itemAt</b>( <code>Number index</code> ) : Object <div class="mdesc">
\r
701 <div class="short">Returns the item at the specified index.</div>
\r
703 Returns the item at the specified index. <div class="mdetail-params">
\r
704 <strong>Parameters:</strong>
\r
705 <ul><li><code>index</code> : Number<div class="sub-desc">The index of the item.</div></li> </ul>
\r
706 <strong>Returns:</strong>
\r
708 <li><code>Object</code><div class="sub-desc">The item at the specified index.</div></li>
\r
714 <td class="msource">MixedCollection</td>
\r
716 <tr class="method-row expandable">
\r
717 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
719 <a id="Ext.util.MixedCollection-key"></a>
\r
720 <b>key</b>( <code>String/Number key</code> ) : Object <div class="mdesc">
\r
721 <div class="short">Returns the item associated with the passed key.</div>
\r
723 Returns the item associated with the passed key. <div class="mdetail-params">
\r
724 <strong>Parameters:</strong>
\r
725 <ul><li><code>key</code> : String/Number<div class="sub-desc">The key of the item.</div></li> </ul>
\r
726 <strong>Returns:</strong>
\r
728 <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
\r
734 <td class="msource">MixedCollection</td>
\r
736 <tr class="method-row alt expandable">
\r
737 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
739 <a id="Ext.util.MixedCollection-keySort"></a>
\r
740 <b>keySort</b>( <span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span> ) : void <div class="mdesc">
\r
741 <div class="short">Sorts this collection by keys</div>
\r
743 Sorts this collection by keys <div class="mdetail-params">
\r
744 <strong>Parameters:</strong>
\r
745 <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>
\r
746 <strong>Returns:</strong>
\r
748 <li><code>void</code></li>
\r
754 <td class="msource">MixedCollection</td>
\r
756 <tr class="method-row expandable">
\r
757 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
759 <a id="Ext.util.MixedCollection-last"></a>
\r
760 <b>last</b>() : Object <div class="mdesc">
\r
761 <div class="short">Returns the last item in the collection.</div>
\r
763 Returns the last item in the collection. <div class="mdetail-params">
\r
764 <strong>Parameters:</strong>
\r
765 <ul><li>None.</li> </ul>
\r
766 <strong>Returns:</strong>
\r
768 <li><code>Object</code><div class="sub-desc">the last item in the collection..</div></li>
\r
774 <td class="msource">MixedCollection</td>
\r
776 <tr class="method-row inherited alt expandable">
\r
777 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
779 <a id="Ext.util.MixedCollection-on"></a>
\r
780 <b>on</b>( <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 <div class="mdesc">
\r
781 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
\r
783 Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params">
\r
784 <strong>Parameters:</strong>
\r
785 <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
786 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
\r
787 <strong>Returns:</strong>
\r
789 <li><code>void</code></li>
\r
795 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
\r
797 <tr class="method-row inherited expandable">
\r
798 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
800 <a id="Ext.util.MixedCollection-purgeListeners"></a>
\r
801 <b>purgeListeners</b>() : void <div class="mdesc">
\r
802 <div class="short">Removes all listeners for this object</div>
\r
804 Removes all listeners for this object <div class="mdetail-params">
\r
805 <strong>Parameters:</strong>
\r
806 <ul><li>None.</li> </ul>
\r
807 <strong>Returns:</strong>
\r
809 <li><code>void</code></li>
\r
815 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
\r
817 <tr class="method-row inherited alt expandable">
\r
818 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
820 <a id="Ext.util.MixedCollection-relayEvents"></a>
\r
821 <b>relayEvents</b>( <code>Object o</code>, <code>Array events</code> ) : void <div class="mdesc">
\r
822 <div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div>
\r
824 Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>. <div class="mdetail-params">
\r
825 <strong>Parameters:</strong>
\r
826 <ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li> </ul>
\r
827 <strong>Returns:</strong>
\r
829 <li><code>void</code></li>
\r
835 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td>
\r
837 <tr class="method-row expandable">
\r
838 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
840 <a id="Ext.util.MixedCollection-remove"></a>
\r
841 <b>remove</b>( <code>Object o</code> ) : Object <div class="mdesc">
\r
842 <div class="short">Remove an item from the collection.</div>
\r
844 Remove an item from the collection. <div class="mdetail-params">
\r
845 <strong>Parameters:</strong>
\r
846 <ul><li><code>o</code> : Object<div class="sub-desc">The item to remove.</div></li> </ul>
\r
847 <strong>Returns:</strong>
\r
849 <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>
\r
855 <td class="msource">MixedCollection</td>
\r
857 <tr class="method-row alt expandable">
\r
858 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
860 <a id="Ext.util.MixedCollection-removeAt"></a>
\r
861 <b>removeAt</b>( <code>Number index</code> ) : Object <div class="mdesc">
\r
862 <div class="short">Remove an item from a specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="remove" href="output/Ext.util.MixedCollection.html#remove">remove</a> event when complete.</div>
\r
864 Remove an item from a specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="remove" href="output/Ext.util.MixedCollection.html#remove">remove</a> event when complete. <div class="mdetail-params">
\r
865 <strong>Parameters:</strong>
\r
866 <ul><li><code>index</code> : Number<div class="sub-desc">The index within the collection of the item to remove.</div></li> </ul>
\r
867 <strong>Returns:</strong>
\r
869 <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>
\r
875 <td class="msource">MixedCollection</td>
\r
877 <tr class="method-row expandable">
\r
878 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
880 <a id="Ext.util.MixedCollection-removeKey"></a>
\r
881 <b>removeKey</b>( <code>String key</code> ) : Object <div class="mdesc">
\r
882 <div class="short">Removed an item associated with the passed key fom the collection.</div>
\r
884 Removed an item associated with the passed key fom the collection. <div class="mdetail-params">
\r
885 <strong>Parameters:</strong>
\r
886 <ul><li><code>key</code> : String<div class="sub-desc">The key of the item to remove.</div></li> </ul>
\r
887 <strong>Returns:</strong>
\r
889 <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>
\r
895 <td class="msource">MixedCollection</td>
\r
897 <tr class="method-row inherited alt expandable">
\r
898 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
900 <a id="Ext.util.MixedCollection-removeListener"></a>
\r
901 <b>removeListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
902 <div class="short">Removes a listener</div>
\r
904 Removes a listener <div class="mdetail-params">
\r
905 <strong>Parameters:</strong>
\r
906 <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>
\r
907 <strong>Returns:</strong>
\r
909 <li><code>void</code></li>
\r
915 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
\r
917 <tr class="method-row expandable">
\r
918 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
920 <a id="Ext.util.MixedCollection-replace"></a>
\r
921 <b>replace</b>( <code>String key</code>, <span class="optional" title="Optional">[<code>o {Object}</code>]</span> ) : Object <div class="mdesc">
\r
922 <div class="short">Replaces an item in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="replace" href="output/Ext.util.MixedCollection.html#replace">replace</a> event when complete.</div>
\r
924 Replaces an item in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="replace" href="output/Ext.util.MixedCollection.html#replace">replace</a> event when complete. <div class="mdetail-params">
\r
925 <strong>Parameters:</strong>
\r
926 <ul><li><code>key</code> : String<div class="sub-desc"><p>The key associated with the item to replace, or the replacement item.</p>
927 <p>If you supplied a <a ext:cls="Ext.util.MixedCollection" ext:member="getKey" href="output/Ext.util.MixedCollection.html#getKey">getKey</a> implementation for this MixedCollection, or if the key
928 of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
929 will be able to <i>derive</i> the key of the replacement item. If you want to replace an item
930 with one having the same key value, then just pass the replacement item in this parameter.</p></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
931 with that key.</div></li> </ul>
\r
932 <strong>Returns:</strong>
\r
934 <li><code>Object</code><div class="sub-desc">The new item.</div></li>
\r
940 <td class="msource">MixedCollection</td>
\r
942 <tr class="method-row inherited alt expandable">
\r
943 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
945 <a id="Ext.util.MixedCollection-resumeEvents"></a>
\r
946 <b>resumeEvents</b>() : void <div class="mdesc">
\r
947 <div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
\r
949 Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>) <div class="mdetail-params">
\r
950 <strong>Parameters:</strong>
\r
951 <ul><li>None.</li> </ul>
\r
952 <strong>Returns:</strong>
\r
954 <li><code>void</code></li>
\r
960 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
\r
962 <tr class="method-row expandable">
\r
963 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
965 <a id="Ext.util.MixedCollection-sort"></a>
\r
966 <b>sort</b>( <span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span> ) : void <div class="mdesc">
\r
967 <div class="short">Sorts this collection with the passed comparison function</div>
\r
969 Sorts this collection with the passed comparison function <div class="mdetail-params">
\r
970 <strong>Parameters:</strong>
\r
971 <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>
\r
972 <strong>Returns:</strong>
\r
974 <li><code>void</code></li>
\r
980 <td class="msource">MixedCollection</td>
\r
982 <tr class="method-row inherited alt expandable">
\r
983 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
985 <a id="Ext.util.MixedCollection-suspendEvents"></a>
\r
986 <b>suspendEvents</b>() : void <div class="mdesc">
\r
987 <div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
\r
989 Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>) <div class="mdetail-params">
\r
990 <strong>Parameters:</strong>
\r
991 <ul><li>None.</li> </ul>
\r
992 <strong>Returns:</strong>
\r
994 <li><code>void</code></li>
\r
1000 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
\r
1002 <tr class="method-row inherited expandable">
\r
1003 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1005 <a id="Ext.util.MixedCollection-un"></a>
\r
1006 <b>un</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
1007 <div class="short">Removes a listener (shorthand for removeListener)</div>
\r
1008 <div class="long">
\r
1009 Removes a listener (shorthand for removeListener) <div class="mdetail-params">
\r
1010 <strong>Parameters:</strong>
\r
1011 <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>
\r
1012 <strong>Returns:</strong>
\r
1014 <li><code>void</code></li>
\r
1020 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
\r
1023 <a id="Ext.util.MixedCollection-events"></a>
1024 <h2>Public Events</h2>
1025 <table cellspacing="0" class="member-table">
1027 <th class="sig-header" colspan="2">Event</th>
1028 <th class="msource-header">Defined By</th>
1030 <tr class="event-row expandable">
\r
1031 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1033 <a id="Ext.util.MixedCollection-add"></a>
\r
1034 <b>add</b> : ( <code>Number index</code>, <code>Object o</code>, <code>String key</code> ) <div class="mdesc">
\r
1035 <div class="short">Fires when an item is added to the collection.</div>
\r
1036 <div class="long">
\r
1037 Fires when an item is added to the collection. <div class="mdetail-params">
\r
1038 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1039 <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>
\r
1044 <td class="msource">MixedCollection</td>
\r
1046 <tr class="event-row alt expandable">
\r
1047 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1049 <a id="Ext.util.MixedCollection-clear"></a>
\r
1050 <b>clear</b> : () <div class="mdesc">
\r
1051 <div class="short">Fires when the collection is cleared.</div>
\r
1052 <div class="long">
\r
1053 Fires when the collection is cleared. <div class="mdetail-params">
\r
1054 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1055 <ul><li>None.</li> </ul>
\r
1060 <td class="msource">MixedCollection</td>
\r
1062 <tr class="event-row expandable">
\r
1063 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1065 <a id="Ext.util.MixedCollection-remove"></a>
\r
1066 <b>remove</b> : ( <code>Object o</code>, <span class="optional" title="Optional">[<code>String key</code>]</span> ) <div class="mdesc">
\r
1067 <div class="short">Fires when an item is removed from the collection.</div>
\r
1068 <div class="long">
\r
1069 Fires when an item is removed from the collection. <div class="mdetail-params">
\r
1070 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1071 <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>
\r
1076 <td class="msource">MixedCollection</td>
\r
1078 <tr class="event-row alt expandable">
\r
1079 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1081 <a id="Ext.util.MixedCollection-replace"></a>
\r
1082 <b>replace</b> : ( <code>String key</code>, <code>Object old</code>, <code>Object new</code> ) <div class="mdesc">
\r
1083 <div class="short">Fires when an item is replaced in the collection.</div>
\r
1084 <div class="long">
\r
1085 Fires when an item is replaced in the collection. <div class="mdetail-params">
\r
1086 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1087 <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>
\r
1092 <td class="msource">MixedCollection</td>
\r