Re: More Splash Screens
Re: More Splash Screens
- Subject: Re: More Splash Screens
- From: Robert Cerny <email@hidden>
- Date: Mon, 22 Dec 2003 08:58:47 +0100
Hi,
I'm a little nit lost in your dozens of post about splash screen. Could
you use just one thread per problem next time? It helps the others to
respond...
Anyway, I'm not sure I fully understand your problem, but I believe
that you have a custom window without border as a splash screen, and
wants to order it out when receiving a mouse click.
I downloaded RoundTransparentWindow sample code from Apple, and changed
mouseDown method to look like this:
- (void)mouseDown:(NSEvent *)theEvent
{
NSRect windowFrame = [self frame];
//grab the mouse location in global coordinates
initialLocation = [self convertBaseToScreen:[theEvent
locationInWindow]];
initialLocation.x -= windowFrame.origin.x;
initialLocation.y -= windowFrame.origin.y;
[self orderOut:self];
}
It does what you need, it orders out after receiving a click...
HTH
Robert
On 22.12.2003, at 7:40, April Gendill wrote:
>
Ok... In hopes that just maybe I would experience success, I
>
subclassed NSWindow for my splash screen. What a waste of time.
>
No matter what I do, I absolutely cannot get the borderless window to
>
go away when clicked... Actually that's not true. If in the subclass I
>
set the ignore mouse click to no and use a mouse down detector I can
>
post a notice that will allow the controller to make the window no
>
visible. HOWEVER the program is usless because the rect that the mouse
>
down is observing is still active so it keeps trying to post events
>
from the window.
>
Is thee anyone that knows anything about transparent windows?
>
1 I have been looking at the examples for hours now and I might as
>
well have been playing pac-man.
>
2 Yes canBecomeKey is set to return yes.
>
>
why can't I remove the subclass when I use orderOut on the window?
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.