Dynamically discover method of dijit objects

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Dynamically discover method of dijit objects

klng@intersoln.com
Hi, I am trying to dynamically get all the methods (eg. onClick, onChange, etc) of dijit objects (eg. dijit.form.ComboBox, dijit.form.ValidationTextBox, etc) but to no success.. I've tried the following code that I got from the web but it doesn't tell much.. Can anyone shred some lights? Thanks in advance.. Object.prototype.getAllMethods = function() { var memberArray = new Array(); for (var method in this) { if (typeof this[method] == 'function') { memberArray.push(method); }; }; return memberArray; }; Object.prototype.getOwnMethods = function() { var memberArray = new Array(); for (var method in this) { if (typeof this[method] == 'function' && this.hasOwnProperty(method)) { memberArray.push(method); }; }; return memberArray; };