Bug with objects sharing the same ID and using onControlClicked() function
Declaring similar objects and having them use the same CSS ID but different onControlClicked() functions results in the last defined function overwriting the previous definitions. I.e. -
This can be worked around by not setting an ID but defining a class instead -
This was with version 2.5.3. Not sure about previous versions.
var obj1 = new AW.UI.ImageText
var obj2 = new AW.UI.ImageText
obj1.setId("imga")
obj1.setControlImage("close")
obj1.onControlClicked = function(event)
{
alert("Mouse Click obj1")
}
obj2.setId("imga")
obj2.setControlImage("close")
obj2.onControlClicked = function(event)
{
alert("Mouse Click obj2")
}
This can be worked around by not setting an ID but defining a class instead -
...
obj1.setClass("obj", "imga")
obj2.setClass("obj", "imga")
...
This was with version 2.5.3. Not sure about previous versions.
Anthony
December 21,