vasquez888
02-19-2008, 04:09 AM
Hi,
I'm having a few problems at the moment with registered dialogs.
1) When I try to find out the docking state of a registered dialog when the rollout is being closed, it complains about how the dialog isn't registered. Please see the test code below.
(
rollout testRoll "Test Rollout"
(
checkButton aBtn "Test Button" checked:false
on testRoll close do
(
format "closed - docking state = %\n" (cui.getDockState testRoll)
)
)
createDialog testRoll style:#(#style_toolwindow)
cui.registerDialogBar testRoll style:#(#cui_dock_horz,#cui_floatable,#cui_handles)
)
2) I'm currently using a workaround to detect when a dialog is docked by using the 'moved' handler. Everytime I dock it, the handler will run, but when I undock it by dragging it back onto the viewport, it doesn't run the handler. Now if I dock it again, it doesn't run the handler. The only way I've found around this is to resize the dialog after undocking it and then it will run the handler. Again some test code below.
(
rollout testRoll "Test Rollout"
(
checkButton aBtn "Test Button" checked:false
on testRoll moved pos do
(
format "moved - docking state = %\n" (try(cui.getDockState testRoll)catch())
)
)
createDialog testRoll style:#(#style_toolwindow)
cui.registerDialogBar testRoll style:#(#cui_dock_horz,#cui_floatable,#cui_handles)
)
Are there any workarounds for the 2 problems stated?
Thanks
I'm having a few problems at the moment with registered dialogs.
1) When I try to find out the docking state of a registered dialog when the rollout is being closed, it complains about how the dialog isn't registered. Please see the test code below.
(
rollout testRoll "Test Rollout"
(
checkButton aBtn "Test Button" checked:false
on testRoll close do
(
format "closed - docking state = %\n" (cui.getDockState testRoll)
)
)
createDialog testRoll style:#(#style_toolwindow)
cui.registerDialogBar testRoll style:#(#cui_dock_horz,#cui_floatable,#cui_handles)
)
2) I'm currently using a workaround to detect when a dialog is docked by using the 'moved' handler. Everytime I dock it, the handler will run, but when I undock it by dragging it back onto the viewport, it doesn't run the handler. Now if I dock it again, it doesn't run the handler. The only way I've found around this is to resize the dialog after undocking it and then it will run the handler. Again some test code below.
(
rollout testRoll "Test Rollout"
(
checkButton aBtn "Test Button" checked:false
on testRoll moved pos do
(
format "moved - docking state = %\n" (try(cui.getDockState testRoll)catch())
)
)
createDialog testRoll style:#(#style_toolwindow)
cui.registerDialogBar testRoll style:#(#cui_dock_horz,#cui_floatable,#cui_handles)
)
Are there any workarounds for the 2 problems stated?
Thanks
