Extending Controls
Hi folks,
I'm pretty new to AW (just bought it yesterday actually) so hopefully someone can point me in the right direction here...
I'd like to extend some of the AW widgets (like Input for example) to support some extra properties. e.g if I've got something like this:
And I wanted a "required" property I could just do this:
But is that the best (i.e. proper ;) way to do it? I'd like to do something like:
and so on. I think it's got something to with Models but I'm not sure (and my eyes are aching from looking at the source code!)
Any advice?
Thanks
Carl
I'm pretty new to AW (just bought it yesterday actually) so hopefully someone can point me in the right direction here...
I'd like to extend some of the AW widgets (like Input for example) to support some extra properties. e.g if I've got something like this:
My = {};
My.UI = {};
My.UI.Input = AW.UI.Input.subclass();
My.UI.Input.create = function() {
var obj = this.prototype;
}
And I wanted a "required" property I could just do this:
My = {};
My.UI = {};
My.UI.Input = AW.UI.Input.subclass();
My.UI.Input.create = function() {
var obj = this.prototype;
obj.required = false;
}
var myObj = new My.UI.Input();
var req = myObj.required;
But is that the best (i.e. proper ;) way to do it? I'd like to do something like:
var myObj = new My.UI.Input();
var req = myObj.getControlRequired();
myObj.setControlRequired( true );
and so on. I think it's got something to with Models but I'm not sure (and my eyes are aching from looking at the source code!)
Any advice?
Thanks
Carl
Carl P
June 27,