Re: LayoutEditor trouble on Mac?
Aaron Stevens <[email protected]> Sun, 12 Oct 2008 13:50:16 -0400
| Newsgroups | gmane.comp.python.pythoncard |
|---|---|
| Message-ID | <[email protected]> |
Neil, Yes, that's the error I got. I'm attaching the stack trace. I got effectively the same stack trace from running Resource Editor, and the same drawing issue. -Aaron On Oct 12, 2008, at 5:57 AM, Neil Hughes wrote: > On Thu, 9 Oct 2008 17:54:09 -0400 Aaron Stevens <[email protected]> wrote: > >> No, I never worked it out. I run Windows XP under Parallels Desktop, >> so I just gave up and used the windows versions of LayoutEditor. >> I'd love to see a solution if you can work it out! > > Well....it looks like the same nested device context limit that is > causing the problem with the BitmapCanvas component is also causing > the problem with the LayoutEditor. I don't see any error under > Windows XP so I guess this limitation has been deliberately > restricted to OSX. > > Aaron....or anybody running 10.5 (I only have Tiger here, so I hope > it's the same cause)....if you run the LayoutEditor from the command > line or set the Python launcher to show all error messages in a > terminal window, and then load the widgets example, when the window > is only partly drawn do you see the stack trace ending with the > error about "Cannot nest wxDCs on the same window"? > > Also, is anybody seeing the same visible issue in the Resource > Editor....where only a part of the window is showing? I just see it > in the LayoutEditor but I get the stack trace in both. > > I've been able to hack the editor code to stop this and get all of > the components showing but I haven't tested it back on my Windows > box to see if it breaks anything...and I can't understand why I'm > not seeing the same visible issue in the ResourceEditor....just an > error message. > > -- > Neil Hughes > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Pythoncard-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pythoncard-users
stacktrace.txt
(text/plain, 3.8 KB)
azs-laptop:resourceEditor azs$ python layoutEditor.py
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: CGContextConcatCTM: invalid context
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: CGContextSaveGState: invalid context
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: doClip: invalid context
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: CGContextSaveGState: invalid context
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: CGContextSetBlendMode: invalid context
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: CGContextSetShouldAntialias: invalid context
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/model.py", line 884, in _dispatch
handler(background, aWxEvent)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/tools/resourceEditor/layoutEditor.py", line 559, in on_size
self.createDC()
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/tools/resourceEditor/layoutEditor.py", line 555, in createDC
dc.SetLogicalFunction(wx.INVERT)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_gdi.py", line 4079, in SetLogicalFunction
return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "status == noErr" failed at /BUILD/wxPython-src-2.8.3.0/src/mac/carbon/graphics.cpp(1324) in EnsureIsValid(): Cannot nest wxDCs on the same window
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: CGContextConcatCTM: invalid context
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: CGContextSaveGState: invalid context
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: doClip: invalid context
Sun Oct 12 13:47:42 azs-laptop.home Python[51521] <Error>: CGContextSaveGState: invalid context
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/menu.py", line 204, in _dispatch
handler(background, aWxEvent)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/tools/resourceEditor/layoutEditor.py", line 1417, in on_menuFileOpen_select
self.doOpenFile()
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/tools/resourceEditor/layoutEditor.py", line 1398, in doOpenFile
self.openFile(result.paths[0])
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/tools/resourceEditor/layoutEditor.py", line 1387, in openFile
self.components[w.name] = w
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/model.py", line 98, in __setitem__
control = component.ComponentFactory().createComponent(self.parent, self.parent.panel, item)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/component.py", line 347, in createComponent
component = clazz(aParent, aResource)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/components/bitmapcanvas.py", line 103, in __init__
self.clear()
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PythonCard/components/bitmapcanvas.py", line 217, in clear
dc.BlitPointSize((0, 0), (self._size[0], self._size[1]), self._bufImage, (0, 0))
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_gdi.py", line 3385, in BlitPointSize
return _gdi_.DC_BlitPointSize(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "status == noErr" failed at /BUILD/wxPython-src-2.8.3.0/src/mac/carbon/graphics.cpp(1324) in EnsureIsValid(): Cannot nest wxDCs on the same window