PDA

View Full Version : [bug in doc]


papasi
04-19-2007, 06:37 PM
instead of

addListener
public function addListener(String eventName, Function handler, [Object options])

it should be

public function addListener(String eventName, Function handler, scope, [Object options])

cheers

Animal
04-19-2007, 09:12 PM
I've changed the docs in SVN to reflect the new options. FYI:


/**
* Appends an event handler to this component
* @param {String} eventName The type of event to listen for
* @param {Function} handler The method the event invokes
* @param {Object} scope (optional) The scope in which to execute the handler
* function. The handler function's "this" context.
* @param {Object} options (optional) An object containing handler configuration
* properties. This may contain any of the following properties:<ul>
* <li>scope {Object} The scope in which to execute the handler function. The handler function's "this" context.</li>
* <li>delegate {String} A simple selector to filter the target or look for a descendant of the target</li>
* <li>stopEvent {Boolean} True to stop the event. That is stop propagation, and prevent the default action.</li>
* <li>preventDefault {Boolean} True to prevent the default action</li>
* <li>stopPropagation {Boolean} True to prevent event propagation</li>
* <li>normalized {Boolean} False to pass a browser event to the handler function instead of an Ext.EventObject</li>
* <li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>
* <li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>
* <li>buffer {Number} Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
* by the specified number of milliseconds. If the event fires again within that time, the original
* handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>
* </ul>
*/