Re: More Splash Screens
Re: More Splash Screens
- Subject: Re: More Splash Screens
- From: April Gendill <email@hidden>
- Date: Mon, 22 Dec 2003 08:24:11 -0700
On Dec 22, 2003, at 12:58 AM, Robert Cerny wrote:
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...
Sorry bout that.
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];
}
My mistake was not in the mousedown it turns out... I don't remember
reading this anywhere, but the controls have to be under everything
else. I never got the image to take a click, but I put a transparent
borderless button directly on the view instance, and on top of that the
image is placed and it works now. I missed the part in the
books/examples/docs that said "Put the controls under everything"
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.
_______________________________________________
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.