Forum: Poser Python Scripting


Subject: Keeping TK Dialog on top

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


Josiah posted Wed, 20 November 2002 at 3:47 AM

This version seems to work fine, except that it sometimes, almost randomly, generates a C exception when moving the TK window, and this seems to be only when calling "scene.ProcessSomeEvents(1)". Perhaps I'm wrong using "root." in the Update function? or maybe the 10ms interval needs to be much larger? This does seem to work REALLY well! I need to experiment more I guess. (This is based on Bushi's example of "poser friendly script".) ############################################ from Tkinter import * import poser scene = poser.Scene() class App: ~def init(self, master): ~~frame = Frame(master) ~~frame.grid() ~def Update(self): ~~scene.ProcessSomeEvents(1) ~~root.lift() ~~root.after(10, self.Update) root = Tk() app = App(root) app.Update() root.mainloop() ############################################