> > http://developer.apple.com/library/mac/#documentation/Cocoa/Reference... >
Aah, thanks for digging that up... > > Yes, right. But I thought that a fairly clear part of the pyglet > > "contract" in previous versions (and with other backends) was that no > > GUI initialization happens implicitly if the "shadow_window" option is > > turned off. So you could import pyglet.app and do various things > > before starting up all the GUI machinery. But with the cocoa backend, > > even with the "shadow_window" option turned off, NSApp.run() gets > > started implicitly by importing "pyglet.app". I'm not sure it's a > > "bug" per se, but it's definitely not a "feature". > > Ah, I see what you mean. I always saw that behaviour as more of an artefact > of the existing implementations than a desired feature, but I may be wrong. > > So, if we want to set Cocoa up this way, there is going to have to be a > check on Window creation to see if the NSApplication needs to be started up, > or has been already. > > However, I don't really get what you are supposed to be able to accomplish, > before the GUI infrastructure is started - at that stage, you can't deal > with fonts, textures, sound: anything really. Agreed. It was important for my "background-thread" needs because it let me import and subclass things from pyglet.app without causing any GUI operations in the main thread. It would also be useful for applications that don't want to start up their windowing until later on in the app's life-cycle (like after receiving a network event or something), but then again, such apps could probably just refrain from importing pyglet.app until then. Given that all, and the hackish nature of what would need to be done to make the cocoa backend work this way, it might not be worthwhile to address this matter at all! -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
