FROM : Bill Bumgarner
DATE : Wed Nov 07 09:57:31 2007
On Nov 7, 2007, at 12:46 AM, Uliano Guerrini wrote:
> the problem arises when you want to use Quartz "somewhere" to do
> something useful and this "somewhere" is likely to be some subclass
> of NSView (or some file imported in that subclass), well, if I'm not
> wrong, that subclass in order to work should be imported in the
> main.py file before
>
> AppHelper.runEventLoop()
>
> which is the call that fires up the window server
If you import it there, you get the errors as indicated by the OP for
exactly the reason I described -- the Quartz module must be imported
*after* the AppKit has brought up the Cocoa stack, including the
window server connection, because the act of importing the Quartz
module tickles the window server connection (among other things).
Whether or not this is a bug in the Quartz module is semi-debatable.
It is certainly inconvenient, but it is not unheard of for Python
modules to behave this way.
> anyway, py2app without aliasing works, in pyobjc-dev they say that
> they'll find to fix what to them seems a problem to be fixed
Actually, if you read the pyobjc-dev thread, it states quite
explicitly that importing Quartz before AppHelper.runEventLoop()
causes the problem *and* that this isn't necessarily a bug.
b.bum
DATE : Wed Nov 07 09:57:31 2007
On Nov 7, 2007, at 12:46 AM, Uliano Guerrini wrote:
> the problem arises when you want to use Quartz "somewhere" to do
> something useful and this "somewhere" is likely to be some subclass
> of NSView (or some file imported in that subclass), well, if I'm not
> wrong, that subclass in order to work should be imported in the
> main.py file before
>
> AppHelper.runEventLoop()
>
> which is the call that fires up the window server
If you import it there, you get the errors as indicated by the OP for
exactly the reason I described -- the Quartz module must be imported
*after* the AppKit has brought up the Cocoa stack, including the
window server connection, because the act of importing the Quartz
module tickles the window server connection (among other things).
Whether or not this is a bug in the Quartz module is semi-debatable.
It is certainly inconvenient, but it is not unheard of for Python
modules to behave this way.
> anyway, py2app without aliasing works, in pyobjc-dev they say that
> they'll find to fix what to them seems a problem to be fixed
Actually, if you read the pyobjc-dev thread, it states quite
explicitly that importing Quartz before AppHelper.runEventLoop()
causes the problem *and* that this isn't necessarily a bug.
b.bum
| Related mails | Author | Date |
|---|---|---|
| Uliano Guerrini | Nov 7, 08:49 | |
| Bill Bumgarner | Nov 7, 08:58 | |
| Uliano Guerrini | Nov 7, 09:46 | |
| Bill Bumgarner | Nov 7, 09:57 | |
| Uliano Guerrini | Nov 7, 10:41 | |
| Bill Bumgarner | Nov 7, 17:48 | |
| Uliano Guerrini | Nov 7, 18:04 | |
| Bill Bumgarner | Nov 7, 18:46 | |
| Luc Heinrich | Nov 8, 09:32 | |
| Uliano Guerrini | Nov 8, 13:00 | |
| Luc Heinrich | Nov 8, 14:10 | |
| Uliano Guerrini | Nov 8, 14:41 |






Cocoa mail archive

