commit extjs-2.2.1
[extjs.git] / docs / output / Ext.util.MixedCollection.html
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>
8         </div>
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>
19                     </table>
20         <div class="description">
21             *
22 A Collection class that maintains both numeric indexes and keys and exposes events.        </div>
23         
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">
28             <tr>
29                 <th class="sig-header" colspan="2">Config Options</th>
30                 <th class="msource-header">Defined By</th>
31             </tr>
32                 <tr class="config-row inherited expandable">\r
33         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
34         <td class="sig">\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
38             <div class="long">\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
40                         </div>\r
41         </td>\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
43     </tr>\r
44             </table>
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">
50             <tr>
51                 <th class="sig-header" colspan="2">Method</th>
52                 <th class="msource-header">Defined By</th>
53             </tr>
54                 <tr class="method-row expandable">\r
55         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
56         <td class="sig">\r
57         <a id="Ext.util.MixedCollection-MixedCollection"></a>\r
58             <b>MixedCollection</b>(&nbsp;<code>Boolean allowFunctions</code>, <code>Function keyFn</code>&nbsp;)            <div class="mdesc">\r
59                         <div class="short"></div>\r
60             <div class="long">\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
69         <ul>\r
70             <li><code></code></li>\r
71         </ul>\r
72     </div>\r
73                 </div>\r
74                         </div>\r
75         </td>\r
76         <td class="msource">MixedCollection</td>\r
77     </tr>\r
78         <tr class="method-row alt expandable">\r
79         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
80         <td class="sig">\r
81         <a id="Ext.util.MixedCollection-add"></a>\r
82             <b>add</b>(&nbsp;<code>String key</code>, <code>Object o</code>&nbsp;) : 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
84             <div class="long">\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
93         <ul>\r
94             <li><code>Object</code><div class="sub-desc">The item added.</div></li>\r
95         </ul>\r
96     </div>\r
97                 </div>\r
98                         </div>\r
99         </td>\r
100         <td class="msource">MixedCollection</td>\r
101     </tr>\r
102         <tr class="method-row expandable">\r
103         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
104         <td class="sig">\r
105         <a id="Ext.util.MixedCollection-addAll"></a>\r
106             <b>addAll</b>(&nbsp;<code>Object/Array objs</code>&nbsp;) : void            <div class="mdesc">\r
107                         <div class="short">Adds all elements of an Array or an Object to the collection.</div>\r
108             <div class="long">\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
114         <ul>\r
115             <li><code>void</code></li>\r
116         </ul>\r
117     </div>\r
118                 </div>\r
119                         </div>\r
120         </td>\r
121         <td class="msource">MixedCollection</td>\r
122     </tr>\r
123         <tr class="method-row inherited alt expandable">\r
124         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
125         <td class="sig">\r
126         <a id="Ext.util.MixedCollection-addEvents"></a>\r
127             <b>addEvents</b>(&nbsp;<code>Object object</code>&nbsp;) : void            <div class="mdesc">\r
128                         <div class="short">Used to define events on this Observable</div>\r
129             <div class="long">\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
134         <ul>\r
135             <li><code>void</code></li>\r
136         </ul>\r
137     </div>\r
138                 </div>\r
139                         </div>\r
140         </td>\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
142     </tr>\r
143         <tr class="method-row inherited expandable">\r
144         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
145         <td class="sig">\r
146         <a id="Ext.util.MixedCollection-addListener"></a>\r
147             <b>addListener</b>(&nbsp;<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>&nbsp;) : void            <div class="mdesc">\r
148                         <div class="short">Appends an event handler to this component</div>\r
149             <div class="long">\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>
161 </ul><br>
162 <p>
163 <b>Combining Options</b><br>
164 Using the options argument, it is possible to combine different types of listeners:<br>
165 <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>, {
168     single: true,
169     delay: 100,
170     forumId: 4
171 });</code></pre>
172 <p>
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.
176 <p>
177 <pre><code>foo.on({
178     <em>'click'</em> : {
179         fn: <b>this</b>.onClick,
180         scope: <b>this</b>,
181         delay: 100
182     },
183     <em>'mouseover'</em> : {
184         fn: <b>this</b>.onMouseOver,
185         scope: <b>this</b>
186     },
187     <em>'mouseout'</em> : {
188         fn: <b>this</b>.onMouseOut,
189         scope: <b>this</b>
190     }
191 });</code></pre>
192 <p>
193 Or a shorthand syntax:<br>
194 <pre><code>foo.on({
195     <em>'click'</em> : <b>this</b>.onClick,
196     <em>'mouseover'</em> : <b>this</b>.onMouseOver,
197     <em>'mouseout'</em> : <b>this</b>.onMouseOut,
198      scope: <b>this</b>
199 });</code></pre></div></li>        </ul>\r
200         <strong>Returns:</strong>\r
201         <ul>\r
202             <li><code>void</code></li>\r
203         </ul>\r
204     </div>\r
205                 </div>\r
206                         </div>\r
207         </td>\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
209     </tr>\r
210         <tr class="method-row alt expandable">\r
211         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
212         <td class="sig">\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
216             <div class="long">\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
221         <ul>\r
222             <li><code>void</code></li>\r
223         </ul>\r
224     </div>\r
225                 </div>\r
226                         </div>\r
227         </td>\r
228         <td class="msource">MixedCollection</td>\r
229     </tr>\r
230         <tr class="method-row expandable">\r
231         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
232         <td class="sig">\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
236             <div class="long">\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
241         <ul>\r
242             <li><code>MixedCollection</code></li>\r
243         </ul>\r
244     </div>\r
245                 </div>\r
246                         </div>\r
247         </td>\r
248         <td class="msource">MixedCollection</td>\r
249     </tr>\r
250         <tr class="method-row alt expandable">\r
251         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
252         <td class="sig">\r
253         <a id="Ext.util.MixedCollection-contains"></a>\r
254             <b>contains</b>(&nbsp;<code>Object o</code>&nbsp;) : Boolean            <div class="mdesc">\r
255                         <div class="short">Returns true if the collection contains the passed Object as an item.</div>\r
256             <div class="long">\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
261         <ul>\r
262             <li><code>Boolean</code><div class="sub-desc">True if the collection contains the Object as an item.</div></li>\r
263         </ul>\r
264     </div>\r
265                 </div>\r
266                         </div>\r
267         </td>\r
268         <td class="msource">MixedCollection</td>\r
269     </tr>\r
270         <tr class="method-row expandable">\r
271         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
272         <td class="sig">\r
273         <a id="Ext.util.MixedCollection-containsKey"></a>\r
274             <b>containsKey</b>(&nbsp;<code>String key</code>&nbsp;) : Boolean            <div class="mdesc">\r
275                         <div class="short">Returns true if the collection contains the passed Object as a key.</div>\r
276             <div class="long">\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
281         <ul>\r
282             <li><code>Boolean</code><div class="sub-desc">True if the collection contains the Object as a key.</div></li>\r
283         </ul>\r
284     </div>\r
285                 </div>\r
286                         </div>\r
287         </td>\r
288         <td class="msource">MixedCollection</td>\r
289     </tr>\r
290         <tr class="method-row alt expandable">\r
291         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
292         <td class="sig">\r
293         <a id="Ext.util.MixedCollection-each"></a>\r
294             <b>each</b>(&nbsp;<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void            <div class="mdesc">\r
295                         <div class="short">Executes the specified function once for every item in the collection, passing the following arguments:
296
297 item : Mixed...</div>\r
298             <div class="long">\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>
304 </ul></div>
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
309         <ul>\r
310             <li><code>void</code></li>\r
311         </ul>\r
312     </div>\r
313                 </div>\r
314                         </div>\r
315         </td>\r
316         <td class="msource">MixedCollection</td>\r
317     </tr>\r
318         <tr class="method-row expandable">\r
319         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
320         <td class="sig">\r
321         <a id="Ext.util.MixedCollection-eachKey"></a>\r
322             <b>eachKey</b>(&nbsp;<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : 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
325             <div class="long">\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
331         <ul>\r
332             <li><code>void</code></li>\r
333         </ul>\r
334     </div>\r
335                 </div>\r
336                         </div>\r
337         </td>\r
338         <td class="msource">MixedCollection</td>\r
339     </tr>\r
340         <tr class="method-row alt expandable">\r
341         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
342         <td class="sig">\r
343         <a id="Ext.util.MixedCollection-filter"></a>\r
344             <b>filter</b>(&nbsp;<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>&nbsp;) : 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
347             <div class="long">\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
354         <ul>\r
355             <li><code>MixedCollection</code><div class="sub-desc">The new filtered collection</div></li>\r
356         </ul>\r
357     </div>\r
358                 </div>\r
359                         </div>\r
360         </td>\r
361         <td class="msource">MixedCollection</td>\r
362     </tr>\r
363         <tr class="method-row expandable">\r
364         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
365         <td class="sig">\r
366         <a id="Ext.util.MixedCollection-filterBy"></a>\r
367             <b>filterBy</b>(&nbsp;<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : 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
370             <div class="long">\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
377         <ul>\r
378             <li><code>MixedCollection</code><div class="sub-desc">The new filtered collection</div></li>\r
379         </ul>\r
380     </div>\r
381                 </div>\r
382                         </div>\r
383         </td>\r
384         <td class="msource">MixedCollection</td>\r
385     </tr>\r
386         <tr class="method-row alt expandable">\r
387         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
388         <td class="sig">\r
389         <a id="Ext.util.MixedCollection-find"></a>\r
390             <b>find</b>(&nbsp;<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : 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
393             <div class="long">\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
399         <ul>\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
401         </ul>\r
402     </div>\r
403                 </div>\r
404                         </div>\r
405         </td>\r
406         <td class="msource">MixedCollection</td>\r
407     </tr>\r
408         <tr class="method-row expandable">\r
409         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
410         <td class="sig">\r
411         <a id="Ext.util.MixedCollection-findIndex"></a>\r
412             <b>findIndex</b>(&nbsp;<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>&nbsp;) : 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
414             <div class="long">\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
420         <ul>\r
421             <li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>\r
422         </ul>\r
423     </div>\r
424                 </div>\r
425                         </div>\r
426         </td>\r
427         <td class="msource">MixedCollection</td>\r
428     </tr>\r
429         <tr class="method-row alt expandable">\r
430         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
431         <td class="sig">\r
432         <a id="Ext.util.MixedCollection-findIndexBy"></a>\r
433             <b>findIndexBy</b>(&nbsp;<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Number start</code>]</span>&nbsp;) : 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
436             <div class="long">\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
442         <ul>\r
443             <li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>\r
444         </ul>\r
445     </div>\r
446                 </div>\r
447                         </div>\r
448         </td>\r
449         <td class="msource">MixedCollection</td>\r
450     </tr>\r
451         <tr class="method-row inherited expandable">\r
452         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
453         <td class="sig">\r
454         <a id="Ext.util.MixedCollection-fireEvent"></a>\r
455             <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean            <div class="mdesc">\r
456                         <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>\r
457             <div class="long">\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
462         <ul>\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
464         </ul>\r
465     </div>\r
466                 </div>\r
467                         </div>\r
468         </td>\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
470     </tr>\r
471         <tr class="method-row alt expandable">\r
472         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
473         <td class="sig">\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
477             <div class="long">\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
482         <ul>\r
483             <li><code>Object</code><div class="sub-desc">the first item in the collection..</div></li>\r
484         </ul>\r
485     </div>\r
486                 </div>\r
487                         </div>\r
488         </td>\r
489         <td class="msource">MixedCollection</td>\r
490     </tr>\r
491         <tr class="method-row expandable">\r
492         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
493         <td class="sig">\r
494         <a id="Ext.util.MixedCollection-get"></a>\r
495             <b>get</b>(&nbsp;<code>String/Number key</code>&nbsp;) : Object            <div class="mdesc">\r
496                         <div class="short">Returns the item associated with the passed key or index.</div>\r
497             <div class="long">\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
502         <ul>\r
503             <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>\r
504         </ul>\r
505     </div>\r
506                 </div>\r
507                         </div>\r
508         </td>\r
509         <td class="msource">MixedCollection</td>\r
510     </tr>\r
511         <tr class="method-row alt expandable">\r
512         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
513         <td class="sig">\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
517             <div class="long">\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
522         <ul>\r
523             <li><code>Number</code><div class="sub-desc">the number of items in the collection.</div></li>\r
524         </ul>\r
525     </div>\r
526                 </div>\r
527                         </div>\r
528         </td>\r
529         <td class="msource">MixedCollection</td>\r
530     </tr>\r
531         <tr class="method-row expandable">\r
532         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
533         <td class="sig">\r
534         <a id="Ext.util.MixedCollection-getKey"></a>\r
535             <b>getKey</b>(&nbsp;<code>Object item</code>&nbsp;) : 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
538             <div class="long">\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);
546 <i>//and so on</i>
547
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;
552 };
553 mc.add(someEl);
554 mc.add(otherEl);
555
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;
559 });
560 mc.add(someEl);
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
565         <ul>\r
566             <li><code>Object</code><div class="sub-desc">The key for the passed item.</div></li>\r
567         </ul>\r
568     </div>\r
569                 </div>\r
570                         </div>\r
571         </td>\r
572         <td class="msource">MixedCollection</td>\r
573     </tr>\r
574         <tr class="method-row alt expandable">\r
575         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
576         <td class="sig">\r
577         <a id="Ext.util.MixedCollection-getRange"></a>\r
578             <b>getRange</b>(&nbsp;<span class="optional" title="Optional">[<code>Number startIndex</code>]</span>, <span class="optional" title="Optional">[<code>Number endIndex</code>]</span>&nbsp;) : Array            <div class="mdesc">\r
579                         <div class="short">Returns a range of items in this collection</div>\r
580             <div class="long">\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
585         <ul>\r
586             <li><code>Array</code><div class="sub-desc">An array of items</div></li>\r
587         </ul>\r
588     </div>\r
589                 </div>\r
590                         </div>\r
591         </td>\r
592         <td class="msource">MixedCollection</td>\r
593     </tr>\r
594         <tr class="method-row inherited expandable">\r
595         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
596         <td class="sig">\r
597         <a id="Ext.util.MixedCollection-hasListener"></a>\r
598             <b>hasListener</b>(&nbsp;<code>String eventName</code>&nbsp;) : Boolean            <div class="mdesc">\r
599                         <div class="short">Checks to see if this object has any listeners for a specified event</div>\r
600             <div class="long">\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
605         <ul>\r
606             <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>\r
607         </ul>\r
608     </div>\r
609                 </div>\r
610                         </div>\r
611         </td>\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
613     </tr>\r
614         <tr class="method-row alt expandable">\r
615         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
616         <td class="sig">\r
617         <a id="Ext.util.MixedCollection-indexOf"></a>\r
618             <b>indexOf</b>(&nbsp;<code>Object o</code>&nbsp;) : Number            <div class="mdesc">\r
619                         <div class="short">Returns index within the collection of the passed Object.</div>\r
620             <div class="long">\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
625         <ul>\r
626             <li><code>Number</code><div class="sub-desc">index of the item. Returns -1 if not found.</div></li>\r
627         </ul>\r
628     </div>\r
629                 </div>\r
630                         </div>\r
631         </td>\r
632         <td class="msource">MixedCollection</td>\r
633     </tr>\r
634         <tr class="method-row expandable">\r
635         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
636         <td class="sig">\r
637         <a id="Ext.util.MixedCollection-indexOfKey"></a>\r
638             <b>indexOfKey</b>(&nbsp;<code>String key</code>&nbsp;) : Number            <div class="mdesc">\r
639                         <div class="short">Returns index within the collection of the passed key.</div>\r
640             <div class="long">\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
645         <ul>\r
646             <li><code>Number</code><div class="sub-desc">index of the key.</div></li>\r
647         </ul>\r
648     </div>\r
649                 </div>\r
650                         </div>\r
651         </td>\r
652         <td class="msource">MixedCollection</td>\r
653     </tr>\r
654         <tr class="method-row alt expandable">\r
655         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
656         <td class="sig">\r
657         <a id="Ext.util.MixedCollection-insert"></a>\r
658             <b>insert</b>(&nbsp;<code>Number index</code>, <code>String key</code>, <span class="optional" title="Optional">[<code>Object o</code>]</span>&nbsp;) : 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
660             <div class="long">\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
665         <ul>\r
666             <li><code>Object</code><div class="sub-desc">The item inserted.</div></li>\r
667         </ul>\r
668     </div>\r
669                 </div>\r
670                         </div>\r
671         </td>\r
672         <td class="msource">MixedCollection</td>\r
673     </tr>\r
674         <tr class="method-row expandable">\r
675         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
676         <td class="sig">\r
677         <a id="Ext.util.MixedCollection-item"></a>\r
678             <b>item</b>(&nbsp;<code>String/Number key</code>&nbsp;) : 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
680 of cal...</div>\r
681             <div class="long">\r
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
687         <ul>\r
688             <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>\r
689         </ul>\r
690     </div>\r
691                 </div>\r
692                         </div>\r
693         </td>\r
694         <td class="msource">MixedCollection</td>\r
695     </tr>\r
696         <tr class="method-row alt expandable">\r
697         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
698         <td class="sig">\r
699         <a id="Ext.util.MixedCollection-itemAt"></a>\r
700             <b>itemAt</b>(&nbsp;<code>Number index</code>&nbsp;) : Object            <div class="mdesc">\r
701                         <div class="short">Returns the item at the specified index.</div>\r
702             <div class="long">\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
707         <ul>\r
708             <li><code>Object</code><div class="sub-desc">The item at the specified index.</div></li>\r
709         </ul>\r
710     </div>\r
711                 </div>\r
712                         </div>\r
713         </td>\r
714         <td class="msource">MixedCollection</td>\r
715     </tr>\r
716         <tr class="method-row expandable">\r
717         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
718         <td class="sig">\r
719         <a id="Ext.util.MixedCollection-key"></a>\r
720             <b>key</b>(&nbsp;<code>String/Number key</code>&nbsp;) : Object            <div class="mdesc">\r
721                         <div class="short">Returns the item associated with the passed key.</div>\r
722             <div class="long">\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
727         <ul>\r
728             <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>\r
729         </ul>\r
730     </div>\r
731                 </div>\r
732                         </div>\r
733         </td>\r
734         <td class="msource">MixedCollection</td>\r
735     </tr>\r
736         <tr class="method-row alt expandable">\r
737         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
738         <td class="sig">\r
739         <a id="Ext.util.MixedCollection-keySort"></a>\r
740             <b>keySort</b>(&nbsp;<span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>&nbsp;) : void            <div class="mdesc">\r
741                         <div class="short">Sorts this collection by keys</div>\r
742             <div class="long">\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
747         <ul>\r
748             <li><code>void</code></li>\r
749         </ul>\r
750     </div>\r
751                 </div>\r
752                         </div>\r
753         </td>\r
754         <td class="msource">MixedCollection</td>\r
755     </tr>\r
756         <tr class="method-row expandable">\r
757         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
758         <td class="sig">\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
762             <div class="long">\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
767         <ul>\r
768             <li><code>Object</code><div class="sub-desc">the last item in the collection..</div></li>\r
769         </ul>\r
770     </div>\r
771                 </div>\r
772                         </div>\r
773         </td>\r
774         <td class="msource">MixedCollection</td>\r
775     </tr>\r
776         <tr class="method-row inherited alt expandable">\r
777         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
778         <td class="sig">\r
779         <a id="Ext.util.MixedCollection-on"></a>\r
780             <b>on</b>(&nbsp;<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>&nbsp;) : void            <div class="mdesc">\r
781                         <div class="short">Appends an event handler to this element (shorthand for addListener)</div>\r
782             <div class="long">\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
788         <ul>\r
789             <li><code>void</code></li>\r
790         </ul>\r
791     </div>\r
792                 </div>\r
793                         </div>\r
794         </td>\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
796     </tr>\r
797         <tr class="method-row inherited expandable">\r
798         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
799         <td class="sig">\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
803             <div class="long">\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
808         <ul>\r
809             <li><code>void</code></li>\r
810         </ul>\r
811     </div>\r
812                 </div>\r
813                         </div>\r
814         </td>\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
816     </tr>\r
817         <tr class="method-row inherited alt expandable">\r
818         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
819         <td class="sig">\r
820         <a id="Ext.util.MixedCollection-relayEvents"></a>\r
821             <b>relayEvents</b>(&nbsp;<code>Object o</code>, <code>Array events</code>&nbsp;) : 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
823             <div class="long">\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
828         <ul>\r
829             <li><code>void</code></li>\r
830         </ul>\r
831     </div>\r
832                 </div>\r
833                         </div>\r
834         </td>\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
836     </tr>\r
837         <tr class="method-row expandable">\r
838         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
839         <td class="sig">\r
840         <a id="Ext.util.MixedCollection-remove"></a>\r
841             <b>remove</b>(&nbsp;<code>Object o</code>&nbsp;) : Object            <div class="mdesc">\r
842                         <div class="short">Remove an item from the collection.</div>\r
843             <div class="long">\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
848         <ul>\r
849             <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>\r
850         </ul>\r
851     </div>\r
852                 </div>\r
853                         </div>\r
854         </td>\r
855         <td class="msource">MixedCollection</td>\r
856     </tr>\r
857         <tr class="method-row alt expandable">\r
858         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
859         <td class="sig">\r
860         <a id="Ext.util.MixedCollection-removeAt"></a>\r
861             <b>removeAt</b>(&nbsp;<code>Number index</code>&nbsp;) : 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
863             <div class="long">\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
868         <ul>\r
869             <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>\r
870         </ul>\r
871     </div>\r
872                 </div>\r
873                         </div>\r
874         </td>\r
875         <td class="msource">MixedCollection</td>\r
876     </tr>\r
877         <tr class="method-row expandable">\r
878         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
879         <td class="sig">\r
880         <a id="Ext.util.MixedCollection-removeKey"></a>\r
881             <b>removeKey</b>(&nbsp;<code>String key</code>&nbsp;) : Object            <div class="mdesc">\r
882                         <div class="short">Removed an item associated with the passed key fom the collection.</div>\r
883             <div class="long">\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
888         <ul>\r
889             <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>\r
890         </ul>\r
891     </div>\r
892                 </div>\r
893                         </div>\r
894         </td>\r
895         <td class="msource">MixedCollection</td>\r
896     </tr>\r
897         <tr class="method-row inherited alt expandable">\r
898         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
899         <td class="sig">\r
900         <a id="Ext.util.MixedCollection-removeListener"></a>\r
901             <b>removeListener</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void            <div class="mdesc">\r
902                         <div class="short">Removes a listener</div>\r
903             <div class="long">\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
908         <ul>\r
909             <li><code>void</code></li>\r
910         </ul>\r
911     </div>\r
912                 </div>\r
913                         </div>\r
914         </td>\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
916     </tr>\r
917         <tr class="method-row expandable">\r
918         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
919         <td class="sig">\r
920         <a id="Ext.util.MixedCollection-replace"></a>\r
921             <b>replace</b>(&nbsp;<code>String key</code>, <span class="optional" title="Optional">[<code>o {Object}</code>]</span>&nbsp;) : 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
923             <div class="long">\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
933         <ul>\r
934             <li><code>Object</code><div class="sub-desc">The new item.</div></li>\r
935         </ul>\r
936     </div>\r
937                 </div>\r
938                         </div>\r
939         </td>\r
940         <td class="msource">MixedCollection</td>\r
941     </tr>\r
942         <tr class="method-row inherited alt expandable">\r
943         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
944         <td class="sig">\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
948             <div class="long">\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
953         <ul>\r
954             <li><code>void</code></li>\r
955         </ul>\r
956     </div>\r
957                 </div>\r
958                         </div>\r
959         </td>\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
961     </tr>\r
962         <tr class="method-row expandable">\r
963         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
964         <td class="sig">\r
965         <a id="Ext.util.MixedCollection-sort"></a>\r
966             <b>sort</b>(&nbsp;<span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span>&nbsp;) : void            <div class="mdesc">\r
967                         <div class="short">Sorts this collection with the passed comparison function</div>\r
968             <div class="long">\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
973         <ul>\r
974             <li><code>void</code></li>\r
975         </ul>\r
976     </div>\r
977                 </div>\r
978                         </div>\r
979         </td>\r
980         <td class="msource">MixedCollection</td>\r
981     </tr>\r
982         <tr class="method-row inherited alt expandable">\r
983         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
984         <td class="sig">\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
988             <div class="long">\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
993         <ul>\r
994             <li><code>void</code></li>\r
995         </ul>\r
996     </div>\r
997                 </div>\r
998                         </div>\r
999         </td>\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
1001     </tr>\r
1002         <tr class="method-row inherited expandable">\r
1003         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
1004         <td class="sig">\r
1005         <a id="Ext.util.MixedCollection-un"></a>\r
1006             <b>un</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : 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
1013         <ul>\r
1014             <li><code>void</code></li>\r
1015         </ul>\r
1016     </div>\r
1017                 </div>\r
1018                         </div>\r
1019         </td>\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
1021     </tr>\r
1022             </table>
1023                 <a id="Ext.util.MixedCollection-events"></a>
1024         <h2>Public Events</h2>
1025                 <table cellspacing="0" class="member-table">
1026             <tr>
1027                 <th class="sig-header" colspan="2">Event</th>
1028                 <th class="msource-header">Defined By</th>
1029             </tr>
1030                 <tr class="event-row expandable">\r
1031         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
1032         <td class="sig">\r
1033         <a id="Ext.util.MixedCollection-add"></a>\r
1034             <b>add</b> : (&nbsp;<code>Number index</code>, <code>Object o</code>, <code>String key</code>&nbsp;)            <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
1040     </div>\r
1041                 </div>\r
1042                         </div>\r
1043         </td>\r
1044         <td class="msource">MixedCollection</td>\r
1045     </tr>\r
1046         <tr class="event-row alt expandable">\r
1047         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
1048         <td class="sig">\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
1056     </div>\r
1057                 </div>\r
1058                         </div>\r
1059         </td>\r
1060         <td class="msource">MixedCollection</td>\r
1061     </tr>\r
1062         <tr class="event-row expandable">\r
1063         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
1064         <td class="sig">\r
1065         <a id="Ext.util.MixedCollection-remove"></a>\r
1066             <b>remove</b> : (&nbsp;<code>Object o</code>, <span class="optional" title="Optional">[<code>String key</code>]</span>&nbsp;)            <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
1072     </div>\r
1073                 </div>\r
1074                         </div>\r
1075         </td>\r
1076         <td class="msource">MixedCollection</td>\r
1077     </tr>\r
1078         <tr class="event-row alt expandable">\r
1079         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
1080         <td class="sig">\r
1081         <a id="Ext.util.MixedCollection-replace"></a>\r
1082             <b>replace</b> : (&nbsp;<code>String key</code>, <code>Object old</code>, <code>Object new</code>&nbsp;)            <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
1088     </div>\r
1089                 </div>\r
1090                         </div>\r
1091         </td>\r
1092         <td class="msource">MixedCollection</td>\r
1093     </tr>\r
1094             </table>
1095         
1096         </div>