Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.util.Memento.js
1 Ext.data.JsonP.Ext_util_Memento({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9
10     ],
11     "method": [
12       {
13         "deprecated": null,
14         "alias": null,
15         "href": "Memento.html#Ext-util-Memento-method-constructor",
16         "tagname": "method",
17         "protected": false,
18         "shortDoc": "Creates a new memento and optionally captures properties from the target object. ...",
19         "static": false,
20         "params": [
21           {
22             "type": "Object",
23             "optional": false,
24             "doc": "<p>The target from which to capture properties. If specified in the\nconstructor, this target becomes the default target for all other operations.</p>\n",
25             "name": "target"
26           },
27           {
28             "type": "String|Array",
29             "optional": false,
30             "doc": "<p>The property or array of properties to capture.</p>\n",
31             "name": "props"
32           }
33         ],
34         "private": false,
35         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Memento.js",
36         "doc": "<p>Creates a new memento and optionally captures properties from the target object.</p>\n",
37         "owner": "Ext.util.Memento",
38         "name": "Memento",
39         "html_filename": "Memento.html",
40         "return": {
41           "type": "Object",
42           "doc": "\n"
43         },
44         "linenr": 57
45       },
46       {
47         "deprecated": null,
48         "alias": null,
49         "protected": false,
50         "tagname": "method",
51         "href": "Base3.html#Ext-Base-method-addStatics",
52         "shortDoc": "Add / override static properties of this class. ...",
53         "static": true,
54         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
55         "private": false,
56         "params": [
57           {
58             "type": "Object",
59             "optional": false,
60             "doc": "\n",
61             "name": "members"
62           }
63         ],
64         "name": "addStatics",
65         "owner": "Ext.Base",
66         "doc": "<p>Add / override static properties of this class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.addStatics({\n    someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'\n    method1: function() { ... },    // My.cool.Class.method1 = function() { ... };\n    method2: function() { ... }     // My.cool.Class.method2 = function() { ... };\n});\n</code></pre>\n",
67         "linenr": 388,
68         "return": {
69           "type": "Ext.Base",
70           "doc": "<p>this</p>\n"
71         },
72         "html_filename": "Base3.html"
73       },
74       {
75         "deprecated": null,
76         "alias": null,
77         "protected": false,
78         "tagname": "method",
79         "href": "Base3.html#Ext-Base-method-callOverridden",
80         "shortDoc": "Call the original method that was previously overridden with Ext.Base.override\n\nExt.define('My.Cat', {\n    constructo...",
81         "static": false,
82         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
83         "private": false,
84         "params": [
85           {
86             "type": "Array/Arguments",
87             "optional": false,
88             "doc": "<p>The arguments, either an array or the <code>arguments</code> object</p>\n",
89             "name": "args"
90           }
91         ],
92         "name": "callOverridden",
93         "owner": "Ext.Base",
94         "doc": "<p>Call the original method that was previously overridden with <a href=\"#/api/Ext.Base-method-override\" rel=\"Ext.Base-method-override\" class=\"docClass\">Ext.Base.override</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
95         "linenr": 269,
96         "return": {
97           "type": "Mixed",
98           "doc": "<p>Returns the result after calling the overridden method</p>\n"
99         },
100         "html_filename": "Base3.html"
101       },
102       {
103         "deprecated": null,
104         "alias": null,
105         "protected": true,
106         "tagname": "method",
107         "href": "Base3.html#Ext-Base-method-callParent",
108         "shortDoc": "Call the parent's overridden method. ...",
109         "static": false,
110         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
111         "private": false,
112         "params": [
113           {
114             "type": "Array/Arguments",
115             "optional": false,
116             "doc": "<p>The arguments, either an array or the <code>arguments</code> object\nfrom the current method, for example: <code>this.callParent(arguments)</code></p>\n",
117             "name": "args"
118           }
119         ],
120         "name": "callParent",
121         "owner": "Ext.Base",
122         "doc": "<p>Call the parent's overridden method. For example:</p>\n\n<pre><code>Ext.define('My.own.A', {\n    constructor: function(test) {\n        alert(test);\n    }\n});\n\nExt.define('My.own.B', {\n    extend: 'My.own.A',\n\n    constructor: function(test) {\n        alert(test);\n\n        this.callParent([test + 1]);\n    }\n});\n\nExt.define('My.own.C', {\n    extend: 'My.own.B',\n\n    constructor: function() {\n        alert(\"Going to call parent's overriden constructor...\");\n\n        this.callParent(arguments);\n    }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n                         // alerts '2', then alerts '3'\n</code></pre>\n",
123         "linenr": 124,
124         "return": {
125           "type": "Mixed",
126           "doc": "<p>Returns the result from the superclass' method</p>\n"
127         },
128         "html_filename": "Base3.html"
129       },
130       {
131         "deprecated": null,
132         "alias": null,
133         "protected": false,
134         "tagname": "method",
135         "href": "Memento.html#Ext-util-Memento-method-capture",
136         "shortDoc": "Captures the specified properties from the target object in this memento. ...",
137         "static": false,
138         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Memento.js",
139         "private": false,
140         "params": [
141           {
142             "type": "String|Array",
143             "optional": false,
144             "doc": "<p>The property or array of properties to capture.</p>\n",
145             "name": "props"
146           },
147           {
148             "type": "Object",
149             "optional": false,
150             "doc": "<p>The object from which to capture properties.</p>\n",
151             "name": "target"
152           }
153         ],
154         "name": "capture",
155         "owner": "Ext.util.Memento",
156         "doc": "<p>Captures the specified properties from the target object in this memento.</p>\n",
157         "linenr": 72,
158         "return": {
159           "type": "void",
160           "doc": "\n"
161         },
162         "html_filename": "Memento.html"
163       },
164       {
165         "deprecated": null,
166         "alias": null,
167         "protected": false,
168         "tagname": "method",
169         "href": "Base3.html#Ext-Base-method-create",
170         "shortDoc": "Create a new instance of this Class. ...",
171         "static": true,
172         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
173         "private": false,
174         "params": [
175
176         ],
177         "name": "create",
178         "owner": "Ext.Base",
179         "doc": "<p>Create a new instance of this Class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n</code></pre>\n\n<p>All parameters are passed to the constructor of the class.</p>\n",
180         "linenr": 329,
181         "return": {
182           "type": "Object",
183           "doc": "<p>the created instance.</p>\n"
184         },
185         "html_filename": "Base3.html"
186       },
187       {
188         "deprecated": null,
189         "alias": null,
190         "protected": false,
191         "tagname": "method",
192         "href": "Base3.html#Ext-Base-method-createAlias",
193         "shortDoc": "Create aliases for existing prototype methods. ...",
194         "static": true,
195         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
196         "private": false,
197         "params": [
198           {
199             "type": "String/Object",
200             "optional": false,
201             "doc": "<p>The new method name, or an object to set multiple aliases. See\n<a href=\"#/api/Ext.Function-method-flexSetter\" rel=\"Ext.Function-method-flexSetter\" class=\"docClass\">flexSetter</a></p>\n",
202             "name": "alias"
203           },
204           {
205             "type": "String/Object",
206             "optional": false,
207             "doc": "<p>The original method name</p>\n",
208             "name": "origin"
209           }
210         ],
211         "name": "createAlias",
212         "owner": "Ext.Base",
213         "doc": "<p>Create aliases for existing prototype methods. Example:</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    method1: function() { ... },\n    method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n    method3: 'method1',\n    method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -&gt; test.method1()\n</code></pre>\n",
214         "linenr": 648,
215         "return": {
216           "type": "void",
217           "doc": "\n"
218         },
219         "html_filename": "Base3.html"
220       },
221       {
222         "deprecated": null,
223         "alias": null,
224         "protected": false,
225         "tagname": "method",
226         "href": "Base3.html#Ext-Base-method-getName",
227         "shortDoc": "Get the current class' name in string format. ...",
228         "static": false,
229         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
230         "private": false,
231         "params": [
232
233         ],
234         "name": "getName",
235         "owner": "Ext.Base",
236         "doc": "<p>Get the current class' name in string format.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    constructor: function() {\n        alert(this.self.getName()); // alerts 'My.cool.Class'\n    }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n</code></pre>\n",
237         "linenr": 631,
238         "return": {
239           "type": "String",
240           "doc": "<p>className</p>\n"
241         },
242         "html_filename": "Base3.html"
243       },
244       {
245         "deprecated": null,
246         "alias": null,
247         "protected": false,
248         "tagname": "method",
249         "href": "Base3.html#Ext-Base-method-implement",
250         "shortDoc": "Add methods / properties to the prototype of this class. ...",
251         "static": true,
252         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
253         "private": false,
254         "params": [
255           {
256             "type": "Object",
257             "optional": false,
258             "doc": "\n",
259             "name": "members"
260           }
261         ],
262         "name": "implement",
263         "owner": "Ext.Base",
264         "doc": "<p>Add methods / properties to the prototype of this class.</p>\n\n<pre><code>Ext.define('My.awesome.Cat', {\n    constructor: function() {\n        ...\n    }\n});\n\n My.awesome.Cat.implement({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n</code></pre>\n",
265         "linenr": 415,
266         "return": {
267           "type": "void",
268           "doc": "\n"
269         },
270         "html_filename": "Base3.html"
271       },
272       {
273         "deprecated": null,
274         "alias": null,
275         "protected": true,
276         "tagname": "method",
277         "href": "Base3.html#Ext-Base-method-initConfig",
278         "shortDoc": "Initialize configuration for this class. ...",
279         "static": false,
280         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
281         "private": false,
282         "params": [
283           {
284             "type": "Object",
285             "optional": false,
286             "doc": "\n",
287             "name": "config"
288           }
289         ],
290         "name": "initConfig",
291         "owner": "Ext.Base",
292         "doc": "<p>Initialize configuration for this class. a typical example:</p>\n\n<pre><code>Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n\n        return this;\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n</code></pre>\n",
293         "linenr": 63,
294         "return": {
295           "type": "Object",
296           "doc": "<p>mixins The mixin prototypes as key - value pairs</p>\n"
297         },
298         "html_filename": "Base3.html"
299       },
300       {
301         "deprecated": null,
302         "alias": null,
303         "protected": false,
304         "tagname": "method",
305         "href": "Base3.html#Ext-Base-method-override",
306         "shortDoc": "Override prototype members of this class. ...",
307         "static": true,
308         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
309         "private": false,
310         "params": [
311           {
312             "type": "Object",
313             "optional": false,
314             "doc": "\n",
315             "name": "members"
316           }
317         ],
318         "name": "override",
319         "owner": "Ext.Base",
320         "doc": "<p>Override prototype members of this class. Overridden methods can be invoked via\n<a href=\"#/api/Ext.Base-method-callOverridden\" rel=\"Ext.Base-method-callOverridden\" class=\"docClass\">Ext.Base.callOverridden</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
321         "linenr": 518,
322         "return": {
323           "type": "Ext.Base",
324           "doc": "<p>this</p>\n"
325         },
326         "html_filename": "Base3.html"
327       },
328       {
329         "deprecated": null,
330         "alias": null,
331         "protected": false,
332         "tagname": "method",
333         "href": "Memento.html#Ext-util-Memento-method-remove",
334         "shortDoc": "Removes the specified properties from this memento. ...",
335         "static": false,
336         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Memento.js",
337         "private": false,
338         "params": [
339           {
340             "type": "String|Array",
341             "optional": false,
342             "doc": "<p>The property or array of properties to remove.</p>\n",
343             "name": "props"
344           }
345         ],
346         "name": "remove",
347         "owner": "Ext.util.Memento",
348         "doc": "<p>Removes the specified properties from this memento. These properties will not be\nrestored later without re-capturing their values.</p>\n",
349         "linenr": 81,
350         "return": {
351           "type": "void",
352           "doc": "\n"
353         },
354         "html_filename": "Memento.html"
355       },
356       {
357         "deprecated": null,
358         "alias": null,
359         "protected": false,
360         "tagname": "method",
361         "href": "Memento.html#Ext-util-Memento-method-restore",
362         "shortDoc": "Restores the specified properties from this memento to the target object. ...",
363         "static": false,
364         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Memento.js",
365         "private": false,
366         "params": [
367           {
368             "type": "String|Array",
369             "optional": false,
370             "doc": "<p>The property or array of properties to restore.</p>\n",
371             "name": "props"
372           },
373           {
374             "type": "Boolean",
375             "optional": false,
376             "doc": "<p>True to remove the restored properties from this memento or\nfalse to keep them (default is true).</p>\n",
377             "name": "clear"
378           },
379           {
380             "type": "Object",
381             "optional": false,
382             "doc": "<p>The object to which to restore properties.</p>\n",
383             "name": "target"
384           }
385         ],
386         "name": "restore",
387         "owner": "Ext.util.Memento",
388         "doc": "<p>Restores the specified properties from this memento to the target object.</p>\n",
389         "linenr": 90,
390         "return": {
391           "type": "void",
392           "doc": "\n"
393         },
394         "html_filename": "Memento.html"
395       },
396       {
397         "deprecated": null,
398         "alias": null,
399         "protected": false,
400         "tagname": "method",
401         "href": "Memento.html#Ext-util-Memento-method-restoreAll",
402         "shortDoc": "Restores all captured properties in this memento to the target object. ...",
403         "static": false,
404         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Memento.js",
405         "private": false,
406         "params": [
407           {
408             "type": "Boolean",
409             "optional": false,
410             "doc": "<p>True to remove the restored properties from this memento or\nfalse to keep them (default is true).</p>\n",
411             "name": "clear"
412           },
413           {
414             "type": "Object",
415             "optional": false,
416             "doc": "<p>The object to which to restore properties.</p>\n",
417             "name": "target"
418           }
419         ],
420         "name": "restoreAll",
421         "owner": "Ext.util.Memento",
422         "doc": "<p>Restores all captured properties in this memento to the target object.</p>\n",
423         "linenr": 104,
424         "return": {
425           "type": "void",
426           "doc": "\n"
427         },
428         "html_filename": "Memento.html"
429       },
430       {
431         "deprecated": null,
432         "alias": null,
433         "protected": true,
434         "tagname": "method",
435         "href": "Base3.html#Ext-Base-method-statics",
436         "shortDoc": "Get the reference to the class from which this object was instantiated. ...",
437         "static": false,
438         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
439         "private": false,
440         "params": [
441
442         ],
443         "name": "statics",
444         "owner": "Ext.Base",
445         "doc": "<p>Get the reference to the class from which this object was instantiated. Note that unlike <a href=\"#/api/Ext.Base-property-self\" rel=\"Ext.Base-property-self\" class=\"docClass\">Ext.Base.self</a>,\n<code>this.statics()</code> is scope-independent and it always returns the class from which it was called, regardless of what\n<code>this</code> points to during run-time</p>\n\n<pre><code>Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n\n        return this;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n</code></pre>\n",
446         "linenr": 199,
447         "return": {
448           "type": "Class",
449           "doc": "\n"
450         },
451         "html_filename": "Base3.html"
452       }
453     ],
454     "property": [
455       {
456         "type": "Class",
457         "deprecated": null,
458         "alias": null,
459         "protected": true,
460         "tagname": "property",
461         "href": "Base3.html#Ext-Base-property-self",
462         "shortDoc": "Get the reference to the current class from which this object was instantiated. ...",
463         "static": false,
464         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
465         "private": false,
466         "name": "self",
467         "owner": "Ext.Base",
468         "doc": "<p>Get the reference to the current class from which this object was instantiated. Unlike <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>,\n<code>this.self</code> is scope-dependent and it's meant to be used for dynamic inheritance. See <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>\nfor a detailed comparison</p>\n\n<pre><code>Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); / dependent on 'this'\n\n        return this;\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n</code></pre>\n",
469         "linenr": 18,
470         "html_filename": "Base3.html"
471       },
472       {
473         "type": "Object",
474         "deprecated": null,
475         "alias": null,
476         "protected": false,
477         "tagname": "property",
478         "href": "Memento.html#Ext-util-Memento-property-target",
479         "static": false,
480         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Memento.js",
481         "private": false,
482         "name": "target",
483         "owner": "Ext.util.Memento",
484         "doc": "<p>The default target object for capture/restore (passed to the constructor).</p>\n",
485         "linenr": 51,
486         "html_filename": "Memento.html"
487       }
488     ],
489     "cssVar": [
490
491     ],
492     "cssMixin": [
493
494     ],
495     "event": [
496
497     ]
498   },
499   "singleton": false,
500   "alias": null,
501   "superclasses": [
502     "Ext.Base"
503   ],
504   "protected": false,
505   "tagname": "class",
506   "mixins": [
507
508   ],
509   "href": "Memento.html#Ext-util-Memento",
510   "subclasses": [
511
512   ],
513   "static": false,
514   "author": null,
515   "component": false,
516   "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Memento.js",
517   "private": false,
518   "alternateClassNames": [
519
520   ],
521   "name": "Ext.util.Memento",
522   "doc": "<p>This class manages a set of captured properties from an object. These captured properties\ncan later be restored to an object.</p>\n",
523   "mixedInto": [
524
525   ],
526   "linenr": 1,
527   "xtypes": [
528
529   ],
530   "html_filename": "Memento.html",
531   "extends": "Ext.Base"
532 });