Re: [Pyobjc-dev] import Quartz in 10.5 Xcode Project headache
Brought to you by:
ronaldoussoren
From: Orestis M. <or...@or...> - 2010-02-02 19:31:23
|
On 2 Feb 2010, at 21:14, Chris Bonhage wrote: > I'm trying to use Quartz in my Xcode template-based PyObjC application > to do a window shake animation; everything works great in Snow > Leopard. When I go about testing it on Leopard systems, some bad stuff > happens at application launch, the dock icon bounces continuously, and > the console barfs up this nonsense before quieting down and doing > nothing at all: > > _RegisterApplication(), FAILED TO establish the default connection to > the WindowServer, _CGSDefaultConnection() is NULL. > *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x1d66300> > '(null)') unlocked when not locked > *** Break on _NSLockError() to debug. > NSInternalInconsistencyException - Error (1002) creating CGSWindow > > This issue doesn't occur if the import occurs after > AppHelper.runEventLoop() gets called, but the resulting calls to > Quartz don't appear to be functioning properly, as the window does not > shake and in fact disappears, changing its frame to NSZeroRect for > every frame of the key-animation. > > I've tested this import issue on a clean Xcode project from the > template and it occurs, but the internets at large have little to say > about the matter outside of the py2app realm. Any thoughts/ > workarounds? The fact that this works just fine on Snow Leopard leads > me to believe that this is a bug with PyObjC in Leopard, but I really > hope not. This is a known issue, though I've no idea whose bug it is. The workaround is to put any Quartz-related imports in a place where they are reached *after* the application launches, such as applicationDidFinishLaunching_. If you're doing a lot of work you might move them to an external file to make life easier. Orestis > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |