On Fri, Apr 29, 2011 at 12:50 PM, Zachrahan <[email protected]> wrote:
> That's what I thought, but a little googling made me wonder if things > were otherwise. > This very old discussion, for example: > > http://www.cocoabuilder.com/archive/cocoa/112663-nsapplication-run-called-from-not-the-default-thread.html Ah, I see this limitation is now documented. I don't recall it being so last time I worked on this, but fair enough: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Miscellaneous/AppKit_Functions/Reference/reference.html%23//apple_ref/c/func/NSApplicationMain > 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. -- Tristam MacDonald System Administrator, Suffolk University Math & CS Department http://swiftcoder.wordpress.com/ -- 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.
