Querying Script Local Variables During Development
When developing custom controls or libraries script locals are often used. One problem when developing with script locals is that you can't look at the current value like you can when you use custom property sets. This lesson will show you how to write a getProp handler that will return the value of any script local.
The GetProp Handler
Add the following getProp handler to any script whose script local variables you want to query.
getprop uScriptLocal [pVarName]
put "return" && pVarName into theDo
do theDo
end uScriptLocal
Example Script
Assume you have a script with a script local variable named sFormattedHeight defined.
Access Value of sFormattedHeight
You can quickly access the value of sFormattedHeight by accessing the uScriptLocal custom property of the control.
0 Comments
Add your comment