View Single Post
Old 09-10-2014, 11:28 AM   #32
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,622
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Hi DiapDealer,

Hmm ... that may explain why you can unpack and work with joint mobis but I simply could not see how that could even work based on the code!
Yep. It was definitely working by accident! I see now how it should have been excluding joint mobis. I can fix that pretty easily once this particular weirdness is solved.

Quote:
As your guimain class inherits from Frame, do you think maybe destroy() or quit() needs to be called on itself? If so that should tell your mainloop to exit as the only frame has quit. Then I guess you could follow-up by adding a root.destroy() in run after the mainloop?

So maybe something like the following might work (just a guess here)

in quitApp(), maybe it should end like the following:

def quitApp(self):
self.destroy()
# or maybe the above should simply be self.quit()

But then in run you do the following:

def run(bk):

root = Tk()
root.title('')
root.resizable(True, True)
guiMain(root, bk).pack(fill=Tkconstants.BOTH, expand=False)
root.mainloop()
root.destroy()
return 0


Again, this is just a guess ... I will play around with it on my Mac tonight when I get home from work and see if the same issue happens.

Take care,

KevinH
That's basically what I'm doing now. Except I call self.parent.destroy() in the quitApp method instead of root.destroy() in the main run() method. I think perhaps that somehow I'm preventing control from being handed back to the wrapper/launcher (except in the case of the bk.add() call). I still don't know why it proceeds with the unpack, though. It almost seems as though it's unpacking in parallel with the quitApp call.

Last edited by DiapDealer; 09-10-2014 at 02:23 PM.
DiapDealer is online now