/*!
- * Ext JS Library 3.0.0
+ * Ext JS Library 3.1.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
* @constructor\r
* @param {Object} config The configuration options\r
*/\r
-Ext.Action = function(config){\r
- this.initialConfig = config;\r
- this.itemId = config.itemId = (config.itemId || config.id || Ext.id());\r
- this.items = [];\r
-}\r
-\r
-Ext.Action.prototype = {\r
+Ext.Action = Ext.extend(Object, {\r
/**\r
* @cfg {String} text The text to set for all components using this action (defaults to '').\r
*/\r
* See {@link Ext.Component}.{@link Ext.Component#itemId itemId}.\r
*/\r
/**\r
- * @cfg {Object} scope The scope in which the {@link #handler} function will execute.\r
+ * @cfg {Object} scope The scope (<tt><b>this</b></tt> reference) in which the\r
+ * <code>{@link #handler}</code> is executed. Defaults to this Button.\r
*/\r
\r
+ constructor : function(config){\r
+ this.initialConfig = config;\r
+ this.itemId = config.itemId = (config.itemId || config.id || Ext.id());\r
+ this.items = [];\r
+ },\r
+ \r
// private\r
isAction : true,\r
\r
},\r
\r
/**\r
- * Sets the function that will be called by each component using this action when its primary event is triggered.\r
+ * Sets the function that will be called by each Component using this action when its primary event is triggered.\r
* @param {Function} fn The function that will be invoked by the action's components. The function\r
* will be called with no arguments.\r
- * @param {Object} scope The scope in which the function will execute\r
+ * @param {Object} scope The scope (<code>this</code> reference) in which the function is executed. Defaults to the Component firing the event.\r
*/\r
setHandler : function(fn, scope){\r
this.initialConfig.handler = fn;\r
},\r
\r
/**\r
- * Executes the specified function once for each component currently tied to this action. The function passed\r
+ * Executes the specified function once for each Component currently tied to this action. The function passed\r
* in should accept a single argument that will be an object that supports the basic Action config/method interface.\r
* @param {Function} fn The function to execute for each component\r
- * @param {Object} scope The scope in which the function will execute\r
+ * @param {Object} scope The scope (<code>this</code> reference) in which the function is executed. Defaults to the Component.\r
*/\r
each : function(fn, scope){\r
Ext.each(this.items, fn, scope);\r
execute : function(){\r
this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments);\r
}\r
-};
+});\r