Mac GUI bug?

I’m finding that the TkinterGUI is unresponsive on Mac OSX. It looks like I’m not alone…
https://discourse.panda3d.org/viewtopic.php?t=5604

Is there a problem with my install or is this a known bug?

This appears when running the particles sample and this simple case.

import direct.directbase.DirectStart

taskMgr.popupControls()
 
run()

Versions:
Panda3D: 1.6.2
Mac OS X: 10.5.5 (Leopard)
Python: 2.5.1

These Tk tools were originally developed on Windows, and to my knowledge, no one has ever made an effort to get them to run on Mac.

We’d sure appreciate it if you’d like to give it a whack. :slight_smile:

David

i dont know if it’s a known bug, but i experienced the same issues.

Thanks for the quick response. I’m new to Panda and didn’t get very far.

Mostly I just poked at TkGlobal.py

def tkLoop(self):
    # Do all the tkinter events waiting on this frame
    # dooneevent will return 0 if there are no more events
    # waiting or 1 if there are still more.
    # DONT_WAIT tells tkinter not to block waiting for events
    while tkinter.dooneevent(tkinter.ALL_EVENTS | tkinter.DONT_WAIT):
        pass    	
    # Run forever
	return Task.cont

If you get rid of DONT_WAIT the TkinterGUI seems to work, but it blocks the main loop and breaks the rendering.

If you print out dooneevent you will see it mostly prints ‘0’.

I think this suggests events are getting consumed elsewhere before TkinterGUI get s a chance to process them.

Perhaps if I get more time I’ll look at it more.