Re: Splash screen
Re: Splash screen
- Subject: Re: Splash screen
- From: kristin <email@hidden>
- Date: Thu, 3 May 2001 09:42:20 -0700
Hi Arno,
I agree with most of what Marcel has said.
I was hoping to get more information on your problem with the splash
window not coming up key. One question - is it truly coming up
inactive, or might you be seeing a problem where the window is key (the
titlebar is opaque), but the default button is failing to pulse? If the
default button looks inactive, then this is a known problem that I am
investigating. If the window is truly inactive (the titlebar is
translucent), then it sounds like something else is going on. As
Raphael suggested, you may have better luck doing this from
applicationDidFinishLaunching (although if you find this to be the case,
please let me know).
I also wanted to clarify one thing. It is true that you should not have
to call makeKeyAndOrderFront: on the window. However, this call will
not steal focus from another application. makeKeyAndOrderFront: only
arbitrates key focus among windows in the calling app.
Kristin
On Thursday, May 3, 2001, at 03:20 AM, Marcel Bresink wrote:
Am Donnerstag, 3. Mai 2001 um 05:00 schrieb email@hidden:
- My splash window does come up, but it is not key. The user can make
it key by clicking on it. The only way I could find to make it key is
to have a runModalSession loop instead of runModalForWindow and send
the makeKeyAndOrderFront: message to my window inside the loop. That
seems a bit brute force and the documentation says I'm not supposed to
call makeKeyAndOrderFront: on the window.
How can I ensure that my window is key?
Well, as the documentation says, you shouldn't... ;-)
Imagine the user is typing some text in an editor window while
starting your program. (I'm doing this very often, especially
on slow machines.) When the splash window becomes key, the editor
loses its key status and the user's input is now sent to your
application. The user will be ... disappointed.
- After dismissing the splash screen, the document window behind never
becomes key. Switching app, clicking on the window, etc has no effect.
Very unfortunate.
This happens when you don't stop or abort the modal session. The event
filtering that was responsible for making the window modal is still
active, so the other window does not receive events. A stopModal message
will help, but it's not a good idea to make a splash window modal
anyway.
- An untitled document still gets created in the back of my splash
screen (or a document gets opened if a user launched the app by
double-clicking on one).
How can I delay this till after the user has dismissed the splash
screen?
If it's really a splash screen (and not a warning or license panel),
it's not user-friendly when the window doesn't dismiss itself.
- I couldn't find a way to create a window that looks like a splash
screen (i.e. no title bar). What's the trick?
Initialize the window yourself with
initWithContentRect:styleMask:backing:defer:.
Use a style mask that includes the NSBorderlessWindowMask constant. If
you want
to create the window contents in InterfaceBuilder, swap the content
view of
the IB-defined window with the content view of the window you create
programatically at runtime.
- The Size panel of the inspector in IB shows that my window is
springy on all four sides, yet it is not centered on the screen. How
can I make sure that it is centered?
The springs control how the window relocates itself when it is opened
on a particular screen in relation to the position you defined in IB.
To make sure it's always exactly centered, send a "center" message to
the window before calling orderFront:.
Marcel
--
Dr. Marcel Bresink, Ringstr. 21, 56630 Kretz, Germany
Fon: +49-2632-953150 Fax: -953151 http://www.bresink.de/
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev