The main problem with templates is that the name of the final object might not be what the template is named, since it may get repeated. Location and size is also likely to be variable.
This can mean you have to do some creative scripting to work around referencing the template objects by name. Stuff that has worked for me...
First do a simple test to ensure the script event you're using works at all. I typically do this by setting some value to the toolltip, since it provides visual feedback at runtime.
Next test each object to see if you can target it via script at runtime.
If not, use script to check their names at runtime. If the runtime names are at least consistent across instances of the window, try targeting the runtime object names.
If none of that works, try giving the troublesome object an onHover script that pulls the desired values from its parent or variables assigned in the XML.
If that doesn't work, test to see if the template object is executing any scripts. Template objects might not get initialized with the expected event handlers.
If you can't target the object and the object wont fire its own script handlers, you're screwed. Ask Rothgar to look into fixing it.
|