Comment 1 for bug 273608

Revision history for this message
Craig Macomber (craigm) wrote :

I don't see a crash, but I get 2 separate windows (the attempt to set the handle does nothing). Tested on OSX 10.5 and 10.6 with panda 1.7.2. It works properly under windows7.

Here is some simple code that shows the issue:
import direct.directbase.DirectStart
from direct.task import Task
import wx
from panda3d.core import WindowProperties

app = wx.PySimpleApp()
def handleWxEvents(task=None):
    while app.Pending(): app.Dispatch()
    return Task.cont

taskMgr.add(handleWxEvents, 'handleWxEvents')

frame = wx.Frame(None, -1, 'My wx frame')
base.windowType = 'onscreen'
props = WindowProperties.getDefault()
props.setParentWindow(frame.GetHandle())
base.openDefaultWindow(props = props)
frame.Show(True)

run()