3.2.0

Multiple AW space.

Is this possible?

Say I have a few sets of identical controls on the same page. Currently, I prefix each control ids with the set names. It would be much easier to manage if each set can be treated as seperate instance of the same class with their own unique name.
Wai
February 6,
Sorry, I don't really understand what you mean - could you please explain in more details?
Alex (ActiveWidgets)
February 7,
This is what I am talking about. I solved by encap in a class, and it works perfectly.

function myClass()
{
var myInput;
var myButton;

myInput = new AW.UI.Input;
myInput.setControlText("Input");
document.write(myInput);
myButton = new AW.UI.Button;
myButton.setControlText("Click Here");

myButton.onControlClicked=function(evt)
{
alert(myInput.getControlValue());
}
document.write(myButton);
}

var firstInstance = new myClass();
var secondInstance = new myClass();

The buttons are tied to their respective instance of the same class.
Wai
February 11,

This topic is archived.

See also:


Back to support forum