Im testing the callbacks function, but, I cant do a simple text change in a rollout.

Here, the idea is to press animate on button, to change the label text in the rollout. Check it out:

rollout unnamedRollout "A Test"
(
label lab "this is a test..."
)

createdialog unnamedrollout

callbacks.removeScripts #animateOn
a="the test is ok"
callbacks.addScript #animateOn "et.text=a"

Is impossible to do that type of operation?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Graph's picture

afair callbacks operate on a

afair callbacks operate on a global level so simple solution:

make the rollout global, add a function inside the RO (after your UI controls and other functions and handlers) and put in there what you want it to do

rollout unnamedRollout "A Test"
(
 label lab "this is a test..."
 
 fn cbFN = 
 (
  lab.text = #works
 )
)
global RO = unnamedRollout
createdialog RO
 
callbacks.removeScripts #animateOn
callbacks.addScript #animateOn "RO.cbFN()"

when you do this later on make sure to make the global var something long and specific so it wont get overwritten by others and also doesnt overwrite other vars

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.