mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Remove the hack for wx.CallAfter. A fix for wx.GetApp when embedding is on the way
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import wx
|
||||
wx.CallAfter = lambda x, y : (x, y)
|
||||
from wx.py import shell, version
|
||||
|
||||
class MyPanel(wx.Panel):
|
||||
@@ -7,17 +6,15 @@ class MyPanel(wx.Panel):
|
||||
def __init__(self, parent):
|
||||
# super makes the same as wx.Panel.__init__(self, parent, etc..)
|
||||
# but prepares for Python 3.0 among other things...
|
||||
super(MyPanel, self).__init__(parent, -1,
|
||||
super(MyPanel, self).__init__(parent, -1,
|
||||
style = wx.BORDER_NONE | wx.MAXIMIZE)
|
||||
|
||||
text = wx.StaticText(self, -1,
|
||||
"Everything on this side of the splitter comes from Python.")
|
||||
|
||||
|
||||
intro = 'Welcome To PyCrust %s - The Flakiest Python Shell' % version.VERSION
|
||||
|
||||
# the Pycrust shell object
|
||||
# Ugly hack to overwrite wx.CallAfter, as it requires wx.GetApp()
|
||||
# to return != None
|
||||
pycrust = shell.Shell(self,-1, introText = intro)
|
||||
# pycrust = wx.TextCtrl(self, -1, intro)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user