• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting a splash screen to show
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting a splash screen to show


  • Subject: Re: Getting a splash screen to show
  • From: Jean Suisse <email@hidden>
  • Date: Wed, 15 May 2013 22:05:53 +0200

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.
>> 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?
>
> Only the registration dialog is modal. The splash is not modal because it uses no interaction. It just shows up, some messages get set (in debug builds only), and it goes away when we're all done getting set up. Here's the code that runs after the nib has been loaded. I'm not sure if everything is needed - I didn't write this code:
>
> [splashWindow setLevel:NSFloatingWindowLevel];

That I use.

> [splashWindow setBackgroundColor:[NSColor clearColor]];
> [splashWindow setOpaque:NO];
> [splashWindow setHasShadow:NO];
> [splashWindow invalidateShadow];
> [splashWindow flushWindow];
> [splashWindow display];
> [splashWindow makeKeyAndOrderFront:nil];

That I don't call. I just use  NSWindowController's initWithWindowNibName:

> SetPortWindowPort((WindowRef)[splashWindow windowRef]);
> [[NSApplication sharedApplication] nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO];

That looks weird.

> The strange part is that it does NOT show if Cocoa is going to restore documents. Why would that matter?

I don't know. Something else is going on. Do you require the registration dialog to be modal? Looks like making the dialog non modal or showing it up later would solve the issue.

Jean



-----------
Jean Suisse
Institut de Chimie Moléculaire de l’Université de Bourgogne
(ICMUB) — UMR 6302


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >Getting a splash screen to show (From: Steve Mills <email@hidden>)
 >Re: Getting a splash screen to show (From: Jean Suisse <email@hidden>)
 >Re: Getting a splash screen to show (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Getting a splash screen to show
  • Next by Date: Re: Minor Scriptability Quesiton
  • Previous by thread: Re: Getting a splash screen to show
  • Next by thread: SecTrustEvaluate() failing with kSecTrustResultRecoverableTrustFailure
  • Index(es):
    • Date
    • Thread