:: Forum >>

Suggestion for feature - Control Type

Alex,
When passing controls to a Div-subclass Container ( the Id is not yet defined) and the parameters limmit are 3, because the only way ( which I know) to determine the AW-object-type is like:

var cls=document.getElementsByTagName("span")[0].className;
cls.split('aw.........

And also in case of grid's this is not enought, and I need to use:
obj.$extended

Is there another way I couldn't find ?
If not... is it possible (for next version) to define a new $controltype ?
Thanks

Carlos
Thursday, November 30, 2006
You can compare object constructor against known types -

var obj = new AW.UI.Grid;
// var obj = new AW.UI.Input;


if (obj.constructor == AW.UI.Grid) {
    alert("grid");
}

if (obj.constructor == AW.UI.Input) {
    alert("input");
}
Alex (ActiveWidgets)
Friday, December 1, 2006

This topic is archived.


Back to support forum

Forum search