Demo updates for new wx namespace, from Jeff Grimmett
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
|
||||
#
|
||||
# o Updated for wx namespace
|
||||
#
|
||||
|
||||
"""
|
||||
Run wxPython in a second thread.
|
||||
|
||||
@@ -56,7 +62,8 @@ class viewer_thread:
|
||||
def start(self):
|
||||
""" start the GUI thread
|
||||
"""
|
||||
import thread,time
|
||||
import time
|
||||
import thread
|
||||
thread.start_new_thread(self.run, ())
|
||||
|
||||
def run(self):
|
||||
@@ -68,9 +75,10 @@ class viewer_thread:
|
||||
the import would occur in the main thread and
|
||||
wxPython wouldn't run correctly in the second thread.
|
||||
"""
|
||||
from viewer_basics import *
|
||||
import viewer_basics
|
||||
|
||||
try:
|
||||
self.app = SecondThreadApp(0)
|
||||
self.app = viewer_basics.SecondThreadApp(0)
|
||||
self.app.MainLoop()
|
||||
except TypeError:
|
||||
self.app = None
|
||||
@@ -80,7 +88,8 @@ class viewer_thread:
|
||||
send an event to the catcher window in the
|
||||
other thread and tell it to create a cone window.
|
||||
"""
|
||||
import viewer_basics
|
||||
import viewer_basics
|
||||
|
||||
if self.app:
|
||||
evt = viewer_basics.AddCone()
|
||||
viewer_basics.wxPostEvent(self.app.catcher, evt)
|
||||
|
Reference in New Issue
Block a user