Simple dialog UI - order of functions?
Posted: Sun Feb 11, 2007 7:12 am
I'm trying to determine how the different functions for the pop up dialog are fired off.
Specifically I am confused about :Run and :OnOk.
:Run goes first obviously.
:OnOk fires off when the okay button is clicked. However during some simple testing I change a global variable during :Run, but when okay is clicked this variable has the original value... but then is changed again by :Run a split second AFTER :OnOk.
It almost seems as if :Run happens twice? Why are variables not being updated?
This seems to be the main problem with my copy/paste script. Code fired in the :Run function doesn't effect variables defined for when :OnOk is fired.
I may have to put in two buttons to copy and paste the bones, then just use the "okay" to close the window when finished, not have it do anything at all, but If I change the global variable with a button in the UI it changes back to the default value after okay is clicked, and the second "Run" also is not effected.
I'm very confused. Any help appreciated.
-vern
Specifically I am confused about :Run and :OnOk.
:Run goes first obviously.
:OnOk fires off when the okay button is clicked. However during some simple testing I change a global variable during :Run, but when okay is clicked this variable has the original value... but then is changed again by :Run a split second AFTER :OnOk.
It almost seems as if :Run happens twice? Why are variables not being updated?
This seems to be the main problem with my copy/paste script. Code fired in the :Run function doesn't effect variables defined for when :OnOk is fired.
I may have to put in two buttons to copy and paste the bones, then just use the "okay" to close the window when finished, not have it do anything at all, but If I change the global variable with a button in the UI it changes back to the default value after okay is clicked, and the second "Run" also is not effected.
I'm very confused. Any help appreciated.
-vern