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!
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
Quote:
Originally Posted by DiapDealer
Hey Kevin,
I'm finding some weird behavior with the plugin that I can't really explain (at least on Linux). Suffice to say that I think the full Tk mainloop approach may be introducing some unwanted issues. Once I select a file to process, I simply cannot programmatically stop the plugin (close/destroy the root window) based on certain criteria. It tries to unpack anything I feed it--even though I specifically tell it to jump to the quitApp function if a KF8 book isn't detected (and it does go to the quitApp function--it just also continues to try to unpack). Simply put: the only thing that seems to close the plugin's gui programmatically (once it gets to the doit function) is complete success. Puzzling.
|