Forum: Poser Python Scripting


Subject: Keeping TK Dialog on top

Josiah opened this issue on Nov 17, 2002 ยท 7 posts


Josiah posted Sun, 24 November 2002 at 7:48 AM

Ok, the generated exception seems to be related to the time before looping the "Update" function. On my machine, if I set the ms in the line; root.after(250, self.Update) to less than 250, a exception will be generated if I try to reposition the TK window. If I set it for higher than 250, no problem. Again, this is only when using; scene.ProcessSomeEvents() to let Poser run along with the script. ProcessSomeEvents takes an argument as to how many poser events to process before it returns, but it seems to work the same with, or without a number specified. Could it be that when the loop time is short, ProcessSomeEvents is called again before it is finished? But that dosen't seem right! I wonder, if there is some way to use "after_idle()" to wait untill all events are processed, before calling "Update" again instead of using a ms setting? I have tried, but I am not sure I fully understand how after_idle works. Any ideas?