Re: Getting a splash screen to show

2013-07-30 Thread Quincey Morris
On Jul 30, 2013, at 09:38 , Keith Knauber wrote: > 1) A splash screen is a *much faster* alternative than drawing an incomplete > main window. FWIW, there is an entirely different reason why (I believe) splash screens are no longer recommended. Because of auto-termination, there's generally no

Re: Getting a splash screen to show

2013-07-30 Thread Kyle Sluder
On Jul 30, 2013, at 9:38 AM, Keith Knauber wrote: > 1) A splash screen is a *much faster* alternative than drawing an incomplete > main window. > My splash screen draws in ~30ms. > My full screen document window draw takes ~200ms, even when empty. >Why? > - NSAttributedString takes

Re: Getting a splash screen to show

2013-07-30 Thread Keith Knauber
1) A splash screen is a *much faster* alternative than drawing an incomplete main window. My splash screen draws in ~30ms. My full screen document window draw takes ~200ms, even when empty. Why? - NSAttributedString takes 2000 CPU instructions per *pixel*. - It takes longer

Re: Getting a splash screen to show

2013-07-29 Thread Jens Alfke
On Jul 29, 2013, at 4:08 PM, Keith Knauber wrote: > I can't have my splash screen get stuck on, and obscure anything in case a > modal dialog decides to present itself. The general recommendation is to avoid splash screens altogether. If your app takes long enough to launch that the user woul

Re: Getting a splash screen to show

2013-07-29 Thread Keith Knauber
> > On May 15, 2013, at 11:29 AM, Steve Mills wrote: > > I added more nextEventMatchingMask's and the 4th one would actually cause the > document to be restored, which was way too early in the init method to do > that. But I found this, which seems to work much more reliably. It takes care > o

Re: Getting a splash screen to show

2013-05-15 Thread Jean Suisse
On 15 mai 2013, at 17:59, Steve Mills wrote: > On May 15, 2013, at 10:40:38, Jean Suisse wrote: > >> 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. >

Re: Getting a splash screen to show

2013-05-15 Thread Seth Willits
On May 15, 2013, at 10:48 AM, Steve Mills wrote: > Like I said in an earlier message, I've solved everything by > beginModalSessionForWindow followed by endModalSession. Calling beginModalSessionForWindow and endModalSession back to back to "fix" this issue is a hack, not solution. You'd really

Re: Getting a splash screen to show

2013-05-15 Thread Steve Mills
On May 15, 2013, at 12:37:47, Kyle Sluder wrote: > Make sure the splash window is not restorable, and make sure you're not > relying on getting -applicationOpenUntitledFile:. I turned the Restorable setting off earlier today, since it has no business being on for this. I didn't help. We alread

Re: Getting a splash screen to show

2013-05-15 Thread Kyle Sluder
On May 15, 2013, at 10:06 AM, Steve Mills wrote: > On May 15, 2013, at 11:56:42, Seth Willits wrote: > >> Not much to go on here, unfortunately. It must have something to do with >> what else is in your project or ordering. Showing a window at launch is as >> trivial as it should be, so somet

Re: Getting a splash screen to show

2013-05-15 Thread Steve Mills
On May 15, 2013, at 11:56:42, Seth Willits wrote: > Looks fine, but ditch the invalidate/flush/display is unnecessary. Thanks. > Why is this here? Burn it with fire. Like I said, I didn't write it. And yeah, radiated acid napalm will be used. > Not much to go on here, unfortunately. It must h

Re: Getting a splash screen to show

2013-05-15 Thread Seth Willits
On May 15, 2013, at 8:59 AM, Steve Mills wrote: > [splashWindow setLevel:NSFloatingWindowLevel]; > [splashWindow setBackgroundColor:[NSColor clearColor]]; > [splashWindow setOpaque:NO]; > [splashWindow setHasShadow:NO]; > [splashWindow invalidateShadow]; > [splashWindow flushWindow]; > [splashWind

Re: Getting a splash screen to show

2013-05-15 Thread Steve Mills
I added more nextEventMatchingMask's and the 4th one would actually cause the document to be restored, which was way too early in the init method to do that. But I found this, which seems to work much more reliably. It takes care of doing event type stuff and displays the window. NSModa

Re: Getting a splash screen to show

2013-05-15 Thread Steve Mills
On May 15, 2013, at 10:40:38, Jean Suisse wrote: > 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

Re: Getting a splash screen to show

2013-05-15 Thread Jean Suisse
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:NSFl

Getting a splash screen to show

2013-05-15 Thread Steve Mills
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