This repository has been archived by the owner on Mar 19, 2020. It is now read-only.
/
Ext.t-c.html
2463 lines (2112 loc) · 112 KB
/
Ext.t-c.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="next" href="Ext.configs-c.html">
<link rel="Up" href="Ext.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Ext" rel="Chapter" href="Ext.html">
<link title="Ext_AbstractComponent" rel="Chapter" href="Ext_AbstractComponent.html">
<link title="Ext_AbstractPlugin" rel="Chapter" href="Ext_AbstractPlugin.html">
<link title="Ext_app_Application" rel="Chapter" href="Ext_app_Application.html">
<link title="Ext_app_Controller" rel="Chapter" href="Ext_app_Controller.html">
<link title="Ext_Base" rel="Chapter" href="Ext_Base.html">
<link title="Ext_button_Button" rel="Chapter" href="Ext_button_Button.html">
<link title="Ext_Class" rel="Chapter" href="Ext_Class.html">
<link title="Ext_Component" rel="Chapter" href="Ext_Component.html">
<link title="Ext_ComponentLoader" rel="Chapter" href="Ext_ComponentLoader.html">
<link title="Ext_chart_Callout" rel="Chapter" href="Ext_chart_Callout.html">
<link title="Ext_chart_Chart" rel="Chapter" href="Ext_chart_Chart.html">
<link title="Ext_chart_Label" rel="Chapter" href="Ext_chart_Label.html">
<link title="Ext_chart_Highlight" rel="Chapter" href="Ext_chart_Highlight.html">
<link title="Ext_chart_Mask" rel="Chapter" href="Ext_chart_Mask.html">
<link title="Ext_chart_Navigation" rel="Chapter" href="Ext_chart_Navigation.html">
<link title="Ext_chart_Tip" rel="Chapter" href="Ext_chart_Tip.html">
<link title="Ext_chart_axis_Abstract" rel="Chapter" href="Ext_chart_axis_Abstract.html">
<link title="Ext_chart_axis_Axis" rel="Chapter" href="Ext_chart_axis_Axis.html">
<link title="Ext_chart_series_Series" rel="Chapter" href="Ext_chart_series_Series.html">
<link title="Ext_chart_theme_Theme" rel="Chapter" href="Ext_chart_theme_Theme.html">
<link title="Ext_container_AbstractContainer" rel="Chapter" href="Ext_container_AbstractContainer.html">
<link title="Ext_container_Container" rel="Chapter" href="Ext_container_Container.html">
<link title="Ext_container_DockingContainer" rel="Chapter" href="Ext_container_DockingContainer.html">
<link title="Ext_container_Viewport" rel="Chapter" href="Ext_container_Viewport.html">
<link title="Ext_Date" rel="Chapter" href="Ext_Date.html">
<link title="Ext_data_AbstractStore" rel="Chapter" href="Ext_data_AbstractStore.html">
<link title="Ext_data_Batch" rel="Chapter" href="Ext_data_Batch.html">
<link title="Ext_data_Errors" rel="Chapter" href="Ext_data_Errors.html">
<link title="Ext_data_Field" rel="Chapter" href="Ext_data_Field.html">
<link title="Ext_data_Model" rel="Chapter" href="Ext_data_Model.html">
<link title="Ext_data_Operation" rel="Chapter" href="Ext_data_Operation.html">
<link title="Ext_data_proxy_Ajax" rel="Chapter" href="Ext_data_proxy_Ajax.html">
<link title="Ext_data_proxy_Proxy" rel="Chapter" href="Ext_data_proxy_Proxy.html">
<link title="Ext_data_proxy_Server" rel="Chapter" href="Ext_data_proxy_Server.html">
<link title="Ext_data_reader_Reader" rel="Chapter" href="Ext_data_reader_Reader.html">
<link title="Ext_data_Request" rel="Chapter" href="Ext_data_Request.html">
<link title="Ext_data_ResultSet" rel="Chapter" href="Ext_data_ResultSet.html">
<link title="Ext_data_Store" rel="Chapter" href="Ext_data_Store.html">
<link title="Ext_data_writer_Writer" rel="Chapter" href="Ext_data_writer_Writer.html">
<link title="Ext_dd_DD" rel="Chapter" href="Ext_dd_DD.html">
<link title="Ext_dd_DDProxy" rel="Chapter" href="Ext_dd_DDProxy.html">
<link title="Ext_dd_DDTarget" rel="Chapter" href="Ext_dd_DDTarget.html">
<link title="Ext_dd_DragDrop" rel="Chapter" href="Ext_dd_DragDrop.html">
<link title="Ext_dd_DragSource" rel="Chapter" href="Ext_dd_DragSource.html">
<link title="Ext_dd_DragTracker" rel="Chapter" href="Ext_dd_DragTracker.html">
<link title="Ext_dd_StatusProxy" rel="Chapter" href="Ext_dd_StatusProxy.html">
<link title="Ext_dom_AbstractElement" rel="Chapter" href="Ext_dom_AbstractElement.html">
<link title="Ext_dom_CompositeElement" rel="Chapter" href="Ext_dom_CompositeElement.html">
<link title="Ext_dom_CompositeElementLite" rel="Chapter" href="Ext_dom_CompositeElementLite.html">
<link title="Ext_dom_Element" rel="Chapter" href="Ext_dom_Element.html">
<link title="Ext_dom_Element_Fly" rel="Chapter" href="Ext_dom_Element_Fly.html">
<link title="Ext_draw_Component" rel="Chapter" href="Ext_draw_Component.html">
<link title="Ext_draw_Sprite" rel="Chapter" href="Ext_draw_Sprite.html">
<link title="Ext_draw_Surface" rel="Chapter" href="Ext_draw_Surface.html">
<link title="Ext_ElementLoader" rel="Chapter" href="Ext_ElementLoader.html">
<link title="Ext_Error" rel="Chapter" href="Ext_Error.html">
<link title="Ext_EventObject" rel="Chapter" href="Ext_EventObject.html">
<link title="Ext_enums_Widget" rel="Chapter" href="Ext_enums_Widget.html">
<link title="Ext_form_action_Action" rel="Chapter" href="Ext_form_action_Action.html">
<link title="Ext_form_Basic" rel="Chapter" href="Ext_form_Basic.html">
<link title="Ext_form_FieldAncestor" rel="Chapter" href="Ext_form_FieldAncestor.html">
<link title="Ext_form_field_Base" rel="Chapter" href="Ext_form_field_Base.html">
<link title="Ext_form_field_Field" rel="Chapter" href="Ext_form_field_Field.html">
<link title="Ext_form_field_Text" rel="Chapter" href="Ext_form_field_Text.html">
<link title="Ext_form_Labelable" rel="Chapter" href="Ext_form_Labelable.html">
<link title="Ext_form_Panel" rel="Chapter" href="Ext_form_Panel.html">
<link title="Ext_grid_column_Column" rel="Chapter" href="Ext_grid_column_Column.html">
<link title="Ext_grid_feature_Feature" rel="Chapter" href="Ext_grid_feature_Feature.html">
<link title="Ext_grid_header_Container" rel="Chapter" href="Ext_grid_header_Container.html">
<link title="Ext_grid_locking_Lockable" rel="Chapter" href="Ext_grid_locking_Lockable.html">
<link title="Ext_grid_Panel" rel="Chapter" href="Ext_grid_Panel.html">
<link title="Ext_grid_plugin_Editing" rel="Chapter" href="Ext_grid_plugin_Editing.html">
<link title="Ext_grid_View" rel="Chapter" href="Ext_grid_View.html">
<link title="Ext_layout_container_Container" rel="Chapter" href="Ext_layout_container_Container.html">
<link title="Ext_layout_ContextItem" rel="Chapter" href="Ext_layout_ContextItem.html">
<link title="Ext_layout_Layout" rel="Chapter" href="Ext_layout_Layout.html">
<link title="Ext_layout_SizePolicy" rel="Chapter" href="Ext_layout_SizePolicy.html">
<link title="Ext_LoadMask" rel="Chapter" href="Ext_LoadMask.html">
<link title="Ext_Loader" rel="Chapter" href="Ext_Loader.html">
<link title="Ext_MessageBox" rel="Chapter" href="Ext_MessageBox.html">
<link title="Ext_menu_Menu" rel="Chapter" href="Ext_menu_Menu.html">
<link title="Ext_panel_AbstractPanel" rel="Chapter" href="Ext_panel_AbstractPanel.html">
<link title="Ext_panel_Panel" rel="Chapter" href="Ext_panel_Panel.html">
<link title="Ext_panel_Table" rel="Chapter" href="Ext_panel_Table.html">
<link title="Ext_Queryable" rel="Chapter" href="Ext_Queryable.html">
<link title="Ext_selection_DataViewModel" rel="Chapter" href="Ext_selection_DataViewModel.html">
<link title="Ext_selection_Model" rel="Chapter" href="Ext_selection_Model.html">
<link title="Ext_selection_RowModel" rel="Chapter" href="Ext_selection_RowModel.html">
<link title="Ext_state_Manager" rel="Chapter" href="Ext_state_Manager.html">
<link title="Ext_state_Provider" rel="Chapter" href="Ext_state_Provider.html">
<link title="Ext_state_Stateful" rel="Chapter" href="Ext_state_Stateful.html">
<link title="Ext_Template" rel="Chapter" href="Ext_Template.html">
<link title="Ext_tip_QuickTip" rel="Chapter" href="Ext_tip_QuickTip.html">
<link title="Ext_tip_QuickTipManager" rel="Chapter" href="Ext_tip_QuickTipManager.html">
<link title="Ext_tip_Tip" rel="Chapter" href="Ext_tip_Tip.html">
<link title="Ext_tip_ToolTip" rel="Chapter" href="Ext_tip_ToolTip.html">
<link title="Ext_util_AbstractMixedCollection" rel="Chapter" href="Ext_util_AbstractMixedCollection.html">
<link title="Ext_util_Animate" rel="Chapter" href="Ext_util_Animate.html">
<link title="Ext_util_Bindable" rel="Chapter" href="Ext_util_Bindable.html">
<link title="Ext_util_ComponentDragger" rel="Chapter" href="Ext_util_ComponentDragger.html">
<link title="Ext_util_ElementContainer" rel="Chapter" href="Ext_util_ElementContainer.html">
<link title="Ext_util_Filter" rel="Chapter" href="Ext_util_Filter.html">
<link title="Ext_util_Floating" rel="Chapter" href="Ext_util_Floating.html">
<link title="Ext_util_Format" rel="Chapter" href="Ext_util_Format.html">
<link title="Ext_util_Grouper" rel="Chapter" href="Ext_util_Grouper.html">
<link title="Ext_util_KeyMap" rel="Chapter" href="Ext_util_KeyMap.html">
<link title="Ext_util_MixedCollection" rel="Chapter" href="Ext_util_MixedCollection.html">
<link title="Ext_util_Observable" rel="Chapter" href="Ext_util_Observable.html">
<link title="Ext_util_Offset" rel="Chapter" href="Ext_util_Offset.html">
<link title="Ext_util_Point" rel="Chapter" href="Ext_util_Point.html">
<link title="Ext_util_Positionable" rel="Chapter" href="Ext_util_Positionable.html">
<link title="Ext_util_Region" rel="Chapter" href="Ext_util_Region.html">
<link title="Ext_util_Renderable" rel="Chapter" href="Ext_util_Renderable.html">
<link title="Ext_util_Sortable" rel="Chapter" href="Ext_util_Sortable.html">
<link title="Ext_util_Sorter" rel="Chapter" href="Ext_util_Sorter.html">
<link title="Ext_Version" rel="Chapter" href="Ext_Version.html">
<link title="Ext_view_AbstractView" rel="Chapter" href="Ext_view_AbstractView.html">
<link title="Ext_view_Table" rel="Chapter" href="Ext_view_Table.html">
<link title="Ext_view_View" rel="Chapter" href="Ext_view_View.html">
<link title="Ext_window_MessageBox" rel="Chapter" href="Ext_window_MessageBox.html">
<link title="Ext_window_Window" rel="Chapter" href="Ext_window_Window.html">
<link title="Ext_ZIndexManager" rel="Chapter" href="Ext_ZIndexManager.html">
<link title="ExtUtils" rel="Chapter" href="ExtUtils.html"><title>Ext.t</title>
</head>
<body>
<div class="navbar"> <a href="Ext.html">Up</a>
<a href="Ext.configs-c.html">Next</a>
</div>
<center><h1>Class type <a href="type_Ext.t.html">Ext.t</a></h1></center>
<br>
<pre><span id="TYPEt"><span class="keyword">class type</span> t</span> = <code class="code">object</code> <a href="Ext.t-c.html">..</a> <code class="code">end</code></pre><hr width="100%">
<pre><span id="METHOD_BLANK_IMAGE_URL"><span class="keyword">method</span> _BLANK_IMAGE_URL</span> : <code class="type">Js.js_string Js.t Js.prop</code></pre><div class="info">
<p>URL to a 1x1 transparent gif image used by Ext to create inline icons with
CSS background images. In older versions of IE, this defaults to
"http://sencha.com/s.gif" and you should change this to a URL on your server.
For other browsers it uses an inline data URL.</p> <br>
</div>
<pre><span id="METHOD_SSL_SECURE_URL"><span class="keyword">method</span> _SSL_SECURE_URL</span> : <code class="type">Js.js_string Js.t Js.prop</code></pre><div class="info">
<p>URL to a blank file used by Ext when in secure mode for iframe src and onReady src
to prevent the IE insecure content warning (<code>'about:blank'</code>, except for IE
in secure mode, which is <code>'javascript:""'</code>).</p> <br>
</div>
<pre><span id="METHOD_USE_NATIVE_JSON"><span class="keyword">method</span> _USE_NATIVE_JSON</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>Indicates whether to use native browser parsing for JSON methods.
This option is ignored if the browser does not support native JSON methods.</p>
<p><strong>Note:</strong> Native JSON methods will not work with objects that have functions.
Also, property names must be quoted, otherwise the data will not parse.</p>
<p>
Defaults to: <code class="code">false</code><br>
</div>
<pre><span id="METHODchromeVersion"><span class="keyword">method</span> chromeVersion</span> : <code class="type">Js.number Js.t Js.prop</code></pre><div class="info">
<p>The current version of Chrome (0 if the browser is not Chrome).</p> <br>
</div>
<pre><span id="METHODemptyFn"><span class="keyword">method</span> emptyFn</span> : <code class="type">'a. 'a Js.callback Js.prop</code></pre><div class="info">
<p>A reusable empty function</p> <br>
</div>
<pre><span id="METHODemptyString"><span class="keyword">method</span> emptyString</span> : <code class="type">'b. 'b Js.t Js.prop</code></pre><div class="info">
<p>A zero length string which will pass a truth test. Useful for passing to methods
which use a truth test to reject <i>falsy</i> values where a string value must be cleared.</p> <br>
</div>
<pre><span id="METHODenableFx"><span class="keyword">method</span> enableFx</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the <a href="#!/api/Ext.fx.Anim" rel="Ext.fx.Anim" class="docClass">Ext.fx.Anim</a> Class is available.</p> <br>
</div>
<pre><span id="METHODenableGarbageCollector"><span class="keyword">method</span> enableGarbageCollector</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True to automatically uncache orphaned Ext.Elements periodically</p>
<p>
Defaults to: <code class="code">true</code><br>
</div>
<pre><span id="METHODenableListenerCollection"><span class="keyword">method</span> enableListenerCollection</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True to automatically purge event listeners during garbageCollection.</p>
<p>
Defaults to: <code class="code">true</code><br>
</div>
<pre><span id="METHODenableNestedListenerRemoval"><span class="keyword">method</span> enableNestedListenerRemoval</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p><strong>Experimental.</strong> True to cascade listener removal to child elements when an element
is removed. Currently not optimized for performance.</p>
<p>
Defaults to: <code class="code">false</code><br>
</div>
<pre><span id="METHODenumerables"><span class="keyword">method</span> enumerables</span> : <code class="type">Js.js_string Js.t Js.js_array Js.t Js.prop</code></pre><div class="info">
<p>An array containing extra enumerables for old browsers</p> <br>
</div>
<pre><span id="METHODfirefoxVersion"><span class="keyword">method</span> firefoxVersion</span> : <code class="type">Js.number Js.t Js.prop</code></pre><div class="info">
<p>The current version of Firefox (0 if the browser is not Firefox).</p> <br>
</div>
<pre><span id="METHODglobalEvents"><span class="keyword">method</span> globalEvents</span> : <code class="type"><a href="Ext_util_Observable.t-c.html">Ext_util_Observable.t</a> Js.t Js.prop</code></pre><div class="info">
<p>An instance of <code><a href="#!/api/Ext.util.Observable" rel="Ext.util.Observable" class="docClass">Ext.util.Observable</a></code> through which Ext fires global events.</p>
<p>This Observable instance fires the following events:</p>
<ul>
<li><p><strong><code>idle</code></strong></p>
<p>Fires when an event handler finishes its run, just before returning to browser control.</p>
<p>This includes DOM event handlers, Ajax (including JSONP) event handlers, and <a href="#!/api/Ext.util.TaskRunner" rel="Ext.util.TaskRunner" class="docClass">TaskRunners</a></p>
<p>This can be useful for performing cleanup, or update tasks which need to happen only
after all code in an event handler has been run, but which should not be executed in a timer
due to the intervening browser reflow/repaint which would take place.</p></li>
<li><p><strong><code>ready</code></strong></p>
<p> Fires when the DOM is ready, and all required classes have been loaded. Functionally
the same as <a href="#!/api/Ext-method-onReady" rel="Ext-method-onReady" class="docClass">onReady</a>, but must be called with the <code>single</code> option:</p>
<pre><code> <a href="#!/api/Ext-method-on" rel="Ext-method-on" class="docClass">Ext.on</a>({
ready: function() {
console.log('document is ready!');
},
single: true
});
</code></pre></li>
<li><p><strong><code>resumelayouts</code></strong></p>
<p> Fires after global layout processing has been resumed in <a href="#!/api/Ext.AbstractComponent-method-resumeLayouts" rel="Ext.AbstractComponent-method-resumeLayouts" class="docClass">Ext.AbstractComponent.resumeLayouts</a>.</p></li>
</ul> <br>
</div>
<pre><span id="METHODieVersion"><span class="keyword">method</span> ieVersion</span> : <code class="type">Js.number Js.t Js.prop</code></pre><div class="info">
<p>The current version of IE (0 if the browser is not IE). This does not account
for the documentMode of the current page, which is factored into <a href="#!/api/Ext-property-isIE7" rel="Ext-property-isIE7" class="docClass">isIE7</a>,
<a href="#!/api/Ext-property-isIE8" rel="Ext-property-isIE8" class="docClass">isIE8</a> and <a href="#!/api/Ext-property-isIE9" rel="Ext-property-isIE9" class="docClass">isIE9</a>. Thus this is not always true:</p>
<pre><code><a href="#!/api/Ext-property-isIE8" rel="Ext-property-isIE8" class="docClass">Ext.isIE8</a> == (<a href="#!/api/Ext-property-ieVersion" rel="Ext-property-ieVersion" class="docClass">Ext.ieVersion</a> == 8)
</code></pre> <br>
</div>
<pre><span id="METHODisChrome"><span class="keyword">method</span> isChrome</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Chrome.</p> <br>
</div>
<pre><span id="METHODisFF10"><span class="keyword">method</span> isFF10</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses FireFox 10</p> <br>
</div>
<pre><span id="METHODisFF3_0"><span class="keyword">method</span> isFF3_0</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses FireFox 3.0</p> <br>
</div>
<pre><span id="METHODisFF3_5"><span class="keyword">method</span> isFF3_5</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses FireFox 3.5</p> <br>
</div>
<pre><span id="METHODisFF3_6"><span class="keyword">method</span> isFF3_6</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses FireFox 3.6</p> <br>
</div>
<pre><span id="METHODisFF4"><span class="keyword">method</span> isFF4</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses FireFox 4</p> <br>
</div>
<pre><span id="METHODisFF5"><span class="keyword">method</span> isFF5</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses FireFox 5</p> <br>
</div>
<pre><span id="METHODisGecko"><span class="keyword">method</span> isGecko</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox).</p> <br>
</div>
<pre><span id="METHODisGecko10"><span class="keyword">method</span> isGecko10</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses a Gecko 5.0+ layout engine (e.g. Firefox 5.x).</p> <br>
</div>
<pre><span id="METHODisGecko3"><span class="keyword">method</span> isGecko3</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x).</p> <br>
</div>
<pre><span id="METHODisGecko4"><span class="keyword">method</span> isGecko4</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses a Gecko 2.0+ layout engine (e.g. Firefox 4.x).</p> <br>
</div>
<pre><span id="METHODisGecko5"><span class="keyword">method</span> isGecko5</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses a Gecko 5.0+ layout engine (e.g. Firefox 5.x).</p> <br>
</div>
<pre><span id="METHODisIE"><span class="keyword">method</span> isIE</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer.</p> <br>
</div>
<pre><span id="METHODisIE10"><span class="keyword">method</span> isIE10</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 10.x.</p> <br>
</div>
<pre><span id="METHODisIE10m"><span class="keyword">method</span> isIE10m</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 10.x or lower.</p> <br>
</div>
<pre><span id="METHODisIE10p"><span class="keyword">method</span> isIE10p</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 10.x or higher.</p> <br>
</div>
<pre><span id="METHODisIE6"><span class="keyword">method</span> isIE6</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 6.x.</p> <br>
</div>
<pre><span id="METHODisIE7"><span class="keyword">method</span> isIE7</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 7.x.</p> <br>
</div>
<pre><span id="METHODisIE7m"><span class="keyword">method</span> isIE7m</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 7.x or lower.</p> <br>
</div>
<pre><span id="METHODisIE7p"><span class="keyword">method</span> isIE7p</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 7.x or higher.</p> <br>
</div>
<pre><span id="METHODisIE8"><span class="keyword">method</span> isIE8</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 8.x.</p> <br>
</div>
<pre><span id="METHODisIE8m"><span class="keyword">method</span> isIE8m</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 8.x or lower.</p> <br>
</div>
<pre><span id="METHODisIE8p"><span class="keyword">method</span> isIE8p</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 8.x or higher.</p> <br>
</div>
<pre><span id="METHODisIE9"><span class="keyword">method</span> isIE9</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 9.x.</p> <br>
</div>
<pre><span id="METHODisIE9m"><span class="keyword">method</span> isIE9m</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 9.x or lower.</p> <br>
</div>
<pre><span id="METHODisIE9p"><span class="keyword">method</span> isIE9p</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Internet Explorer 9.x or higher.</p> <br>
</div>
<pre><span id="METHODisLinux"><span class="keyword">method</span> isLinux</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected platform is Linux.</p> <br>
</div>
<pre><span id="METHODisMac"><span class="keyword">method</span> isMac</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected platform is Mac OS.</p> <br>
</div>
<pre><span id="METHODisOpera"><span class="keyword">method</span> isOpera</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Opera.</p> <br>
</div>
<pre><span id="METHODisOpera10_5"><span class="keyword">method</span> isOpera10_5</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Opera 10.5x.</p> <br>
</div>
<pre><span id="METHODisReady"><span class="keyword">method</span> isReady</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True when the document is fully initialized and ready for action</p>
<p>
Defaults to: <code class="code">false</code><br>
</div>
<pre><span id="METHODisSafari"><span class="keyword">method</span> isSafari</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Safari.</p> <br>
</div>
<pre><span id="METHODisSafari2"><span class="keyword">method</span> isSafari2</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Safari 2.x.</p> <br>
</div>
<pre><span id="METHODisSafari3"><span class="keyword">method</span> isSafari3</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Safari 3.x.</p> <br>
</div>
<pre><span id="METHODisSafari4"><span class="keyword">method</span> isSafari4</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Safari 4.x.</p> <br>
</div>
<pre><span id="METHODisSafari5"><span class="keyword">method</span> isSafari5</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Safari 5.x.</p> <br>
</div>
<pre><span id="METHODisSafari5_0"><span class="keyword">method</span> isSafari5_0</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser is Safari 5.0.x.</p> <br>
</div>
<pre><span id="METHODisSecure"><span class="keyword">method</span> isSecure</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the page is running over SSL</p> <br>
</div>
<pre><span id="METHODisWebKit"><span class="keyword">method</span> isWebKit</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected browser uses WebKit.</p> <br>
</div>
<pre><span id="METHODisWindows"><span class="keyword">method</span> isWindows</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>True if the detected platform is Windows.</p> <br>
</div>
<pre><span id="METHODname"><span class="keyword">method</span> name</span> : <code class="type">Js.js_string Js.t Js.prop</code></pre><div class="info">
<p>The name of the property in the global namespace (The <code>window</code> in browser environments) which refers to the current instance of Ext.</p>
<p>This is usually <code>"Ext"</code>, but if a sandboxed build of ExtJS is being used, this will be an alternative name.</p>
<p>If code is being generated for use by <code>eval</code> or to create a <code>new Function</code>, and the global instance
of Ext must be referenced, this is the name that should be built into the code.</p>
<p>
Defaults to: <code class="code">'Ext'</code><br>
</div>
<pre><span id="METHODoperaVersion"><span class="keyword">method</span> operaVersion</span> : <code class="type">Js.number Js.t Js.prop</code></pre><div class="info">
<p>The current version of Opera (0 if the browser is not Opera).</p> <br>
</div>
<pre><span id="METHODsafariVersion"><span class="keyword">method</span> safariVersion</span> : <code class="type">Js.number Js.t Js.prop</code></pre><div class="info">
<p>The current version of Safari (0 if the browser is not Safari).</p> <br>
</div>
<pre><span id="METHODuseShims"><span class="keyword">method</span> useShims</span> : <code class="type">bool Js.t Js.prop</code></pre><div class="info">
<p>By default, Ext intelligently decides whether floating elements should be shimmed.
If you are using flash, you may want to set this to true.</p> <br>
</div>
<pre><span id="METHODwebKitVersion"><span class="keyword">method</span> webKitVersion</span> : <code class="type">Js.number Js.t Js.prop</code></pre><div class="info">
<p>The current version of WebKit (0 if the browser does not use WebKit).</p> <br>
</div>
<pre><span id="METHODaddBehaviors"><span class="keyword">method</span> addBehaviors</span> : <code class="type">'c. 'c Js.t -> unit Js.meth</code></pre><div class="info">
<p>Applies event listeners to elements by selectors when the document is ready.
The event name is specified with an <code>@</code> suffix.</p>
<pre><code><a href="#!/api/Ext-method-addBehaviors" rel="Ext-method-addBehaviors" class="docClass">Ext.addBehaviors</a>({
// add a listener for click on all anchors in element with id foo
'#foo a@click' : function(e, t){
// do something
},
// add the same listener to multiple selectors (separated by comma BEFORE the @)
'#foo a, #bar span.some-class@mouseover' : function(){
// do something
}
});
</code></pre>
<p>
<b>Parameters</b>:
<ul>
<li>obj: <code class="code">_ Js.t</code> <p>The list of behaviors to apply</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODaddNamespaces"><span class="keyword">method</span> addNamespaces</span> : <code class="type">'d. 'd Js.t -> unit Js.meth</code></pre><div class="info">
<p>Adds namespace(s) to known list.</p>
<p>
<b>Parameters</b>:
<ul>
<li>namespace: <code class="code">_ Js.t</code>
</li>
</ul>
<br>
</div>
<pre><span id="METHODapplication"><span class="keyword">method</span> application</span> : <code class="type">'e. 'e Js.t -> unit Js.meth</code></pre><div class="info">
<p>Loads <a href="#!/api/Ext.app.Application" rel="Ext.app.Application" class="docClass">Ext.app.Application</a> class and starts it up with given configuration after the
page is ready.</p>
<p>See <code><a href="#!/api/Ext.app.Application" rel="Ext.app.Application" class="docClass">Ext.app.Application</a></code> for details.</p>
<p>
<b>Parameters</b>:
<ul>
<li>config: <code class="code">_ Js.t</code>
<p>Application config object or name of a class derived from <a href="#!/api/Ext.app.Application" rel="Ext.app.Application" class="docClass">Ext.app.Application</a>.</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODapply"><span class="keyword">method</span> apply</span> : <code class="type">'f 'g 'h 'i. 'f Js.t -> 'g Js.t -> 'h Js.t Js.optdef -> 'i Js.t Js.meth</code></pre><div class="info">
<p>Copies all the properties of config to the specified object.
Note that if recursive merging and cloning without referencing the original objects / arrays is needed, use
<a href="#!/api/Ext.Object-method-merge" rel="Ext.Object-method-merge" class="docClass">Ext.Object.merge</a> instead.</p>
<p>
<b>Parameters</b>:
<ul>
<li>_object: <code class="code">_ Js.t</code>
<p>The receiver of the properties</p>
</li>
<li>config: <code class="code">_ Js.t</code>
<p>The source of the properties</p>
</li>
<li>defaults: <code class="code">_ Js.t</code> (optional)
<p>A different object that will also be applied for default values</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.t</code> <p>returns obj</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODapplyIf"><span class="keyword">method</span> applyIf</span> : <code class="type">'j 'k 'l. 'j Js.t -> 'k Js.t -> 'l Js.t Js.meth</code></pre><div class="info">
<p>Copies all the properties of config to object if they don't already exist.</p>
<p>
<b>Parameters</b>:
<ul>
<li>_object: <code class="code">_ Js.t</code>
<p>The receiver of the properties</p>
</li>
<li>config: <code class="code">_ Js.t</code>
<p>The source of the properties</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.t</code> <p>returns obj</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODbatchLayouts"><span class="keyword">method</span> batchLayouts</span> : <code class="type">'m 'n. 'm Js.callback -> 'n Js.t Js.optdef -> unit Js.meth</code></pre><div class="info">
<p>Utility wrapper that suspends layouts of all components for the duration of a given function.</p>
<p>
<b>Parameters</b>:
<ul>
<li>fn: <code class="code">_ Js.callback</code>
<p>The function to execute.</p>
</li>
<li>scope: <code class="code">_ Js.t</code> (optional)
<p>The scope (<code>this</code> reference) in which the specified function is executed.</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODbind"><span class="keyword">method</span> bind</span> : <code class="type">'o 'p 'q 'r 's.<br> 'o Js.callback -><br> 'p Js.t Js.optdef -><br> 'q Js.js_array Js.t Js.optdef -><br> 'r Js.t Js.optdef -> 's Js.callback Js.meth</code></pre><div class="info">
<p>Create a new function from the provided <code>fn</code>, change <code>this</code> to the provided scope, optionally
overrides arguments for the call. (Defaults to the arguments passed by the caller)</p>
<p><a href="#!/api/Ext-method-bind" rel="Ext-method-bind" class="docClass">Ext.bind</a> is alias for <a href="#!/api/Ext.Function-method-bind" rel="Ext.Function-method-bind" class="docClass">Ext.Function.bind</a></p>
<p>
<b>Parameters</b>:
<ul>
<li>fn: <code class="code">_ Js.callback</code>
<p>The function to delegate.</p>
</li>
<li>scope: <code class="code">_ Js.t</code> (optional)
<p>The scope (<code>this</code> reference) in which the function is executed.
<strong>If omitted, defaults to the default global environment object (usually the browser window).</strong></p>
</li>
<li>args: <code class="code">_ Js.js_array Js.t</code> (optional)
<p>Overrides arguments for the call. (Defaults to the arguments passed by the caller)</p>
</li>
<li>appendArgs: <code class="code">_ Js.t</code> (optional)
<p>if True args are appended to call args instead of overriding,
if a number the args are inserted at the specified position</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.callback</code> <p>The new function</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODcallback"><span class="keyword">method</span> callback</span> : <code class="type">'t 'u 'v 'w.<br> 't Js.callback -><br> 'u Js.t Js.optdef -><br> 'v Js.js_array Js.t Js.optdef -><br> Js.number Js.t Js.optdef -> 'w Js.t Js.meth</code></pre><div class="info">
<p>Execute a callback function in a particular scope. If <code>callback</code> argument is a
function reference, that is called. If it is a string, the string is assumed to
be the name of a method on the given <code>scope</code>. If no function is passed the call
is ignored.</p>
<p>For example, these calls are equivalent:</p>
<pre><code> var myFunc = this.myFunc;
<a href="#!/api/Ext-method-callback" rel="Ext-method-callback" class="docClass">Ext.callback</a>('myFunc', this, [arg1, arg2]);
<a href="#!/api/Ext-method-callback" rel="Ext-method-callback" class="docClass">Ext.callback</a>(myFunc, this, [arg1, arg2]);
<a href="#!/api/Ext-method-isFunction" rel="Ext-method-isFunction" class="docClass">Ext.isFunction</a>(myFunc) && this.myFunc(arg1, arg2);
</code></pre>
<p>
<b>Parameters</b>:
<ul>
<li>callback: <code class="code">_ Js.callback</code>
<p>The callback to execute</p>
</li>
<li>scope: <code class="code">_ Js.t</code> (optional)
<p>The scope to execute in</p>
</li>
<li>args: <code class="code">_ Js.js_array Js.t</code> (optional)
<p>The arguments to pass to the function</p>
</li>
<li>delay: <code class="code">Js.number Js.t</code> (optional)
<p>Pass a number to delay the call by a number of milliseconds.</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.t</code>
<p>The value returned by the callback or <code>undefined</code> (if there is a <code>delay</code>
or if the <code>callback</code> is not a function).</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODclone"><span class="keyword">method</span> clone</span> : <code class="type">'x 'y. 'x Js.t -> 'y Js.t Js.meth</code></pre><div class="info">
<p>Clone simple variables including array, {}-like objects, DOM nodes and Date without keeping the old reference.
A reference for the object itself is returned if it's not a direct decendant of Object. For model cloning,
see <a href="#!/api/Ext.data.Model-method-copy" rel="Ext.data.Model-method-copy" class="docClass">Model.copy</a>.</p>
<p>
<b>Parameters</b>:
<ul>
<li>item: <code class="code">_ Js.t</code>
<p>The variable to clone</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.t</code> <p>clone</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODcoerce"><span class="keyword">method</span> coerce</span> : <code class="type">'z 'a1 'b1. 'z Js.t -> 'a1 Js.t -> 'b1 Js.t Js.meth</code></pre><div class="info">
<p>Coerces the first value if possible so that it is comparable to the second value.</p>
<p>Coercion only works between the basic atomic data types String, Boolean, Number, Date, null and undefined.</p>
<p>Numbers and numeric strings are coerced to Dates using the value as the millisecond era value.</p>
<p>Strings are coerced to Dates by parsing using the <a href="#!/api/Ext.Date-property-defaultFormat" rel="Ext.Date-property-defaultFormat" class="docClass">defaultFormat</a>.</p>
<p>For example</p>
<pre><code><a href="#!/api/Ext-method-coerce" rel="Ext-method-coerce" class="docClass">Ext.coerce</a>('false', true);
</code></pre>
<p>returns the boolean value <code>false</code> because the second parameter is of type <code>Boolean</code>.</p>
<p>
<b>Parameters</b>:
<ul>
<li>from: <code class="code">_ Js.t</code> <p>The value to coerce</p>
</li>
<li>to: <code class="code">_ Js.t</code>
<p>The value it must be compared against</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.t</code> <p>The coerced value.</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODcopyTo"><span class="keyword">method</span> copyTo</span> : <code class="type">'c1 'd1 'e1 'f1.<br> 'c1 Js.t -> 'd1 Js.t -> 'e1 Js.t -> bool Js.t Js.optdef -> 'f1 Js.t Js.meth</code></pre><div class="info">
<p>Copies a set of named properties fom the source object to the destination object.</p>
<p>Example:</p>
<pre><code>ImageComponent = <a href="#!/api/Ext-method-extend" rel="Ext-method-extend" class="docClass">Ext.extend</a>(<a href="#!/api/Ext.Component" rel="Ext.Component" class="docClass">Ext.Component</a>, {
initComponent: function() {
this.autoEl = { tag: 'img' };
MyComponent.superclass.initComponent.apply(this, arguments);
this.initialBox = <a href="#!/api/Ext-method-copyTo" rel="Ext-method-copyTo" class="docClass">Ext.copyTo</a>({}, this.initialConfig, 'x,y,width,height');
}
});
</code></pre>
<p>Important note: To borrow class prototype methods, use <a href="#!/api/Ext.Base-static-method-borrow" rel="Ext.Base-static-method-borrow" class="docClass">Ext.Base.borrow</a> instead.</p>
<p>
<b>Parameters</b>:
<ul>
<li>dest: <code class="code">_ Js.t</code>
<p>The destination object.</p>
</li>
<li>source: <code class="code">_ Js.t</code> <p>The source object.</p>
</li>
<li>names: <code class="code">_ Js.t</code>
<p>Either an Array of property names, or a comma-delimited list
of property names to copy.</p>
</li>
<li>usePrototypeKeys: <code class="code">bool Js.t</code> (optional)
<p>Defaults to false. Pass true to copy keys off of the
prototype as well as the instance.</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.t</code> <p>The modified object.</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODcreate"><span class="keyword">method</span> create</span> : <code class="type">'g1 'h1.<br> Js.js_string Js.t Js.optdef -> 'g1 Js.t Js.optdef -> 'h1 Js.t Js.meth</code></pre><div class="info">
<p>Instantiate a class by either full name, alias or alternate name.</p>
<p>If <a href="#!/api/Ext.Loader" rel="Ext.Loader" class="docClass">Ext.Loader</a> is <a href="#!/api/Ext.Loader-method-setConfig" rel="Ext.Loader-method-setConfig" class="docClass">enabled</a> and the class has
not been defined yet, it will attempt to load the class via synchronous loading.</p>
<p>For example, all these three lines return the same result:</p>
<pre><code> // alias
var window = <a href="#!/api/Ext-method-create" rel="Ext-method-create" class="docClass">Ext.create</a>('widget.window', {
width: 600,
height: 800,
...
});
// alternate name
var window = <a href="#!/api/Ext-method-create" rel="Ext-method-create" class="docClass">Ext.create</a>('<a href="#!/api/Ext.window.Window" rel="Ext.window.Window" class="docClass">Ext.Window</a>', {
width: 600,
height: 800,
...
});
// full class name
var window = <a href="#!/api/Ext-method-create" rel="Ext-method-create" class="docClass">Ext.create</a>('<a href="#!/api/Ext.window.Window" rel="Ext.window.Window" class="docClass">Ext.window.Window</a>', {
width: 600,
height: 800,
...
});
// single object with xclass property:
var window = <a href="#!/api/Ext-method-create" rel="Ext-method-create" class="docClass">Ext.create</a>({
xclass: '<a href="#!/api/Ext.window.Window" rel="Ext.window.Window" class="docClass">Ext.window.Window</a>', // any valid value for 'name' (above)
width: 600,
height: 800,
...
});
</code></pre>
<p>
<b>Parameters</b>:
<ul>
<li>name: <code class="code">Js.js_string Js.t</code> (optional)
<p>The class name or alias. Can be specified as <code>xclass</code>
property if only one object parameter is specified.</p>
</li>
<li>args: <code class="code">_ Js.t</code> (optional)
<p>Additional arguments after the name will be passed to
the class' constructor.</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.t</code> <p>instance</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODcreateByAlias"><span class="keyword">method</span> createByAlias</span> : <code class="type">'i1 'j1. Js.js_string Js.t -> 'i1 Js.t -> 'j1 Js.t Js.meth</code></pre><div class="info">
<p>Instantiate a class by its alias.</p>
<p><a href="#!/api/Ext.ClassManager-method-instantiateByAlias" rel="Ext.ClassManager-method-instantiateByAlias" class="docClass">Ext.ClassManager.instantiateByAlias</a> is usually invoked by the shorthand <a href="#!/api/Ext-method-createByAlias" rel="Ext-method-createByAlias" class="docClass">createByAlias</a>.</p>
<p>If <a href="#!/api/Ext.Loader" rel="Ext.Loader" class="docClass">Ext.Loader</a> is <a href="#!/api/Ext.Loader-method-setConfig" rel="Ext.Loader-method-setConfig" class="docClass">enabled</a> and the class has not been defined yet, it will
attempt to load the class via synchronous loading.</p>
<pre><code>var window = <a href="#!/api/Ext-method-createByAlias" rel="Ext-method-createByAlias" class="docClass">Ext.createByAlias</a>('widget.window', { width: 600, height: 800, ... });
</code></pre>
<p>
<b>Parameters</b>:
<ul>
<li>alias: <code class="code">Js.js_string Js.t</code>
</li>
<li>args: <code class="code">_ Js.t</code>
</li>
</ul>
<br>
</div>
<pre><span id="METHODdecode"><span class="keyword">method</span> decode</span> : <code class="type">'k1. Js.js_string Js.t -> bool Js.t Js.optdef -> 'k1 Js.t Js.meth</code></pre><div class="info">
<p>Shorthand for <a href="#!/api/Ext.JSON-method-decode" rel="Ext.JSON-method-decode" class="docClass">Ext.JSON.decode</a></p>
<p>Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws
a SyntaxError unless the safe option is set.</p>
<p>
<b>Parameters</b>:
<ul>
<li>json: <code class="code">Js.js_string Js.t</code>
<p>The JSON string</p>
</li>
<li>safe: <code class="code">bool Js.t</code> (optional)
<p>True to return null, false to throw an exception if the JSON is invalid.</p>
Defaults to: false
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">_ Js.t</code> <p>The resulting object</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODdefer"><span class="keyword">method</span> defer</span> : <code class="type">'l1 'm1 'n1 'o1.<br> 'l1 Js.callback -><br> Js.number Js.t -><br> 'm1 Js.t Js.optdef -><br> 'n1 Js.js_array Js.t Js.optdef -><br> 'o1 Js.t Js.optdef -> Js.number Js.t Js.meth</code></pre><div class="info">
<p>Calls this function after the number of millseconds specified, optionally in a specific scope. Example usage:</p>
<pre><code>var sayHi = function(name){
alert('Hi, ' + name);
}
// executes immediately:
sayHi('Fred');
// executes after 2 seconds:
<a href="#!/api/Ext.Function-method-defer" rel="Ext.Function-method-defer" class="docClass">Ext.Function.defer</a>(sayHi, 2000, this, ['Fred']);
// this syntax is sometimes useful for deferring
// execution of an anonymous function:
<a href="#!/api/Ext.Function-method-defer" rel="Ext.Function-method-defer" class="docClass">Ext.Function.defer</a>(function(){
alert('Anonymous');
}, 100);
</code></pre>
<p><a href="#!/api/Ext-method-defer" rel="Ext-method-defer" class="docClass">Ext.defer</a> is alias for <a href="#!/api/Ext.Function-method-defer" rel="Ext.Function-method-defer" class="docClass">Ext.Function.defer</a></p>
<p>
<b>Parameters</b>:
<ul>
<li>fn: <code class="code">_ Js.callback</code>
<p>The function to defer.</p>
</li>
<li>millis: <code class="code">Js.number Js.t</code>
<p>The number of milliseconds for the setTimeout call
(if less than or equal to 0 the function is executed immediately)</p>
</li>
<li>scope: <code class="code">_ Js.t</code> (optional)
<p>The scope (<code>this</code> reference) in which the function is executed.
<strong>If omitted, defaults to the browser window.</strong></p>
</li>
<li>args: <code class="code">_ Js.js_array Js.t</code> (optional)
<p>Overrides arguments for the call. (Defaults to the arguments passed by the caller)</p>
</li>
<li>appendArgs: <code class="code">_ Js.t</code> (optional)
<p>if True args are appended to call args instead of overriding,
if a number the args are inserted at the specified position</p>
</li>
</ul>
<p>
<b>Returns</b>:
<ul>
<li><code class="code">Js.number Js.t</code>
<p>The timeout id that can be used with clearTimeout</p>
</li>
</ul>
<br>
</div>
<pre><span id="METHODdefine"><span class="keyword">method</span> define</span> : <code class="type">'p1 'q1 'r1.<br> Js.js_string Js.t -><br> 'p1 Js.t -> 'q1 Js.callback -> (#<a href="Ext_Base.t-c.html">Ext_Base.t</a> as 'r1) Js.t Js.meth</code></pre><div class="info">
<p>Defines a class or override. A basic class is defined like this:</p>
<pre><code> <a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('My.awesome.Class', {
someProperty: 'something',
someMethod: function(s) {
alert(s + this.someProperty);
}
...
});
var obj = new My.awesome.Class();
obj.someMethod('Say '); // alerts 'Say something'
</code></pre>
<p>To create an anonymous class, pass <code>null</code> for the <code>className</code>:</p>
<pre><code> <a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>(null, {
constructor: function () {
// ...
}
});
</code></pre>
<p>In some cases, it is helpful to create a nested scope to contain some private
properties. The best way to do this is to pass a function instead of an object
as the second parameter. This function will be called to produce the class
body:</p>
<pre><code> <a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('MyApp.foo.Bar', function () {
var id = 0;
return {
nextId: function () {
return ++id;
}
};
});
</code></pre>
<p><em>Note</em> that when using override, the above syntax will not override successfully, because
the passed function would need to be executed first to determine whether or not the result
is an override or defining a new object. As such, an alternative syntax that immediately
invokes the function can be used:</p>
<pre><code> <a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('MyApp.override.BaseOverride', function () {
var counter = 0;
return {
override: '<a href="#!/api/Ext.Component" rel="Ext.Component" class="docClass">Ext.Component</a>',
logId: function () {
console.log(++counter, this.id);
}
};
}());
</code></pre>
<p>When using this form of <code><a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a></code>, the function is passed a reference to its
class. This can be used as an efficient way to access any static properties you
may have:</p>
<pre><code> <a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('MyApp.foo.Bar', function (Bar) {
return {
statics: {
staticMethod: function () {
// ...
}
},
method: function () {
return Bar.staticMethod();
}
};
});
</code></pre>
<p>To define an override, include the <code>override</code> property. The content of an
override is aggregated with the specified class in order to extend or modify
that class. This can be as simple as setting default property values or it can
extend and/or replace methods. This can also extend the statics of the class.</p>
<p>One use for an override is to break a large class into manageable pieces.</p>
<pre><code> // File: /src/app/Panel.js
<a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('My.app.Panel', {
extend: '<a href="#!/api/Ext.panel.Panel" rel="Ext.panel.Panel" class="docClass">Ext.panel.Panel</a>',
requires: [
'My.app.PanelPart2',
'My.app.PanelPart3'
]
constructor: function (config) {
this.callParent(arguments); // calls <a href="#!/api/Ext.panel.Panel" rel="Ext.panel.Panel" class="docClass">Ext.panel.Panel</a>'s constructor
//...
},
statics: {
method: function () {
return 'abc';
}
}
});
// File: /src/app/PanelPart2.js
<a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('My.app.PanelPart2', {
override: 'My.app.Panel',
constructor: function (config) {
this.callParent(arguments); // calls My.app.Panel's constructor
//...
}
});
</code></pre>
<p>Another use of overrides is to provide optional parts of classes that can be
independently required. In this case, the class may even be unaware of the
override altogether.</p>
<pre><code> <a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('My.ux.CoolTip', {
override: '<a href="#!/api/Ext.tip.ToolTip" rel="Ext.tip.ToolTip" class="docClass">Ext.tip.ToolTip</a>',
constructor: function (config) {
this.callParent(arguments); // calls <a href="#!/api/Ext.tip.ToolTip" rel="Ext.tip.ToolTip" class="docClass">Ext.tip.ToolTip</a>'s constructor
//...
}
});
</code></pre>
<p>The above override can now be required as normal.</p>
<pre><code> <a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('My.app.App', {
requires: [
'My.ux.CoolTip'
]
});
</code></pre>
<p>Overrides can also contain statics:</p>
<pre><code> <a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass">Ext.define</a>('My.app.BarMod', {
override: 'Ext.foo.Bar',
statics: {
method: function (x) {
return this.callParent([x * 2]); // call Ext.foo.Bar.method
}