When I launch the script the first time I have this error: "Unknown property: "p_cbox" in undefined". But when I launch again the script I have no problem.
Can someone help me to initialize correctly p_cbox ?
struct MyStructure
(
p_cbox = true,
function fn_PropertiesUi =
(
try(destroydialog rol_Properties)catch()
rollout rol_Properties " Properties"
(
checkbox cbox "try me" width:200 checked:p_cbox
on cbox changed state do
(
cbox.checked = state
ui.p_cbox = cbox.checked
print ui.p_cbox
)
)
rol_Properties
),
function fn_MainUi =
(
rollout rol_Main ""
(
button btn "test"
on btn pressed do
(
print ui.p_cbox
)
)
rol_Main
),
function fn_Run =
(
mainRollout = fn_MainUi()
Createdialog mainRollout
propertiesRollout = fn_PropertiesUi()
Createdialog propertiesRollout
)
)
ui = MyStructure()
ui.fn_Run()
By Rodman · 2013-11-18
barigazy · 2013-11-18