This can't be a bug can it? Very strange standalone UI problem
UI.Combo or UI.Radio standalone.
var itsRadioType = new AW.UI.Radio;
itsRadioType.setItemText(["AREC", "PTR", "CNAME", "MX", "HINFO"]);
itsRadioType.setItemCount(5);
itsRadioType.setSelectedItems([0]);
document.write(itsRadioType);
alert(itsRadioType.getSelectedItems());
Works fine.
Now if instead of the last line I call doTest() which is implemented like this:
function doTest()
{
alert(itsRadioType.getSelectedItems());
}
Nothing is displayed and the script stops. Firefox says that itsRadioType has no properties.
Being a C++/C# programmer I must be missing something elementary in JavaScript but the funny thing is that only UI.Radio and UI.Combo show this behaviour. UI.Label for example works fine wrapped inside a doTest function.
var itsRadioType = new AW.UI.Radio;
itsRadioType.setItemText(["AREC", "PTR", "CNAME", "MX", "HINFO"]);
itsRadioType.setItemCount(5);
itsRadioType.setSelectedItems([0]);
document.write(itsRadioType);
alert(itsRadioType.getSelectedItems());
Works fine.
Now if instead of the last line I call doTest() which is implemented like this:
function doTest()
{
alert(itsRadioType.getSelectedItems());
}
Nothing is displayed and the script stops. Firefox says that itsRadioType has no properties.
Being a C++/C# programmer I must be missing something elementary in JavaScript but the funny thing is that only UI.Radio and UI.Combo show this behaviour. UI.Label for example works fine wrapped inside a doTest function.
Karl Thoroddsen
March 10,