In one application I have to display a splash screen while a poorly written framework (DAQmxBase from National Instruments) takes 6 to 11 seconds to initialize itself on the main thread. To do so, I display my splash screen as a non modal, top-level, centered window (use NSWindow's setLevel:NSFloatingWindowLevel to make it top-level).
Do you require your splash screen or the registration window to be modal? Jean On 15 mai 2013, at 17:26, Steve Mills <smi...@makemusic.com> wrote: > Please don't waste my time arguing that splash screens are bad. It's all been > hashed out before. > > How am I supposed to force the splash screen to be visible? It's created and > shown in applicationWillFinishLaunching. The app is document based. Other > modal dialogs *could* appear and go away before the splash screen appears, so > order is important. If a modal dlog *does* appear beforehand (e.g. > registration), then the splash screen will display. If not, something is > preventing the splash screen from showing. This got me thinking it was event > manager related, so I added this after showing the splash screen: > > [[NSApplication sharedApplication] nextEventMatchingMask:NSAnyEventMask > untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO]; > > That fixed it. Well, it fixed it until I tried launching the app and letting > Cocoa restore documents that were open when I quit. Again, no splash screen. > Why is this so hard to do? > > -- > Steve Mills > office: 952-818-3871 > home: 952-401-6255 > cell: 612-803-6157 ----------- Jean Suisse Institut de Chimie Moléculaire de l’Université de Bourgogne (ICMUB) — UMR 6302 _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com