Reputation: 31
I'm using the latest version of wxPython and Python in Mac OSX Lion and haven't had any problems in using any of the wxPython widgets apart from wx.TextCtrl. Every time this control is initialized, the following error occurs and the text control fails to render.
2011-11-11 16:58:57.255 Python[15021:1107]
CFURLCreateWithString was passed this invalid
URLstring:'/System/Library/CoreServices/CommonCocoaPanels.bundle'
(a file system path instead of an URL string). The URL created will
not work with most file URL functions. CFURLCreateWithFileSystemPath or
CFURLCreateWithFileSystemPathRelativeToBase should be used instead.
Any ideas as to what could be causing the problem?
EDIT: I've included the code which generates the problem, I have attempted to isolate the problem to just initialising the TextCtrl and the same issue occurs.
class TextDialog(wx.Dialog):
def __init__(self, parent, id, title):
wx.Dialog.__init__(self, parent, id, title, size=(200,100))
sizer = self.CreateTextSizer('Enter text')
pnl1 = wx.Panel(self, -1, style=wx.SIMPLE_BORDER)
sizer.Add(pnl1)
sizer.Add(wx.TextCtrl(pnl1, -1, "", pos=(10,10)))
self.SetSizer(sizer)
I should add that the common predefined dialog wx.TextEntryDialog also causes this problem.
Thanks for your help so far.
Upvotes: 1
Views: 742
Reputation: 31
Upgrading to wxPython 2.9.2.4 Cocoa for Python 2.7, which is the latest unstable build seems to have alleviated the problem for me. Probably not the wisest solution.
Upvotes: 2