MemoryDC, GetFullTextExtent and Darwin

Nigel W. Moriarty nw_moriarty at yahoo.com
Fri Nov 3 12:00:50 PST 2006


Hi Folks

I'm trying to port a working GUI to Darwin

Python 2.4.3 (#1, Apr  7 2006, 10:54:33) 
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on
darwin
Type "help", "copyright", "credits" or "license" for
more information.
>>> import wx
>>> wx.GetOsDescription()
u'MacOS (Darwin 8.6.1 i386)'
>>> wx.VERSION_STRING
'2.6.3.3'

but this code

  def ConstructBMP(self):
    memory = wxMemoryDC()
    border = 10
    width, height, d, e =
memory.GetFullTextExtent(self.text)

gives this error

    width, height, d, e =
memory.GetFullTextExtent(self.text)
  File
"//Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/wx-2.6-mac-unicode/wx/_gdi.py",
line 3445, in GetFullTextExtent
    return _gdi_.DC_GetFullTextExtent(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion
"wxAssertFailure" failed in
/BUILD/wxPython-src-2.6.3.3/src/mac/carbon/dc.cpp(1482):
Invalid DC


Any ideas

Nigel

---
Nigel W. Moriarty


 
__________________________________________________________________________________________
Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster. 
(http://advision.webevents.yahoo.com/mailbeta) 





More information about the wxpython-users mailing list