Re: NSImageView detect click.
Re: NSImageView detect click.
- Subject: Re: NSImageView detect click.
- From: Scott Anguish <email@hidden>
- Date: Mon, 10 May 2004 17:01:38 -0400
by and large, splash screens are an annoyance.
having said that. :-)
You could change the NSImageView to an NSButton that has no outline,
and use that to dismiss the window. you don't even need to write any
code, just wire it up in IB.
Typically what I do is when I bring the panel up, I also do a performed
delayed click in close button, so it'll go away automatically if the
user doesn't do anything.
OpenUp has all the example code to do this in it..
http://homepage.mac.com/sanguish/OpenUp
On May 10, 2004, at 10:30 AM, Mark Thomas wrote:
Hi,
I'm doing a simple Splash/About screen screen, and I have my window
within
the nib file, and I have placed a NSImageView on this window (covers
whole
window), which I'm planning to create a NSView with a particular file,
and
then give that to the NSImageView. Hopefully quite simple :-).
So I just wanted to detect the mouse has been click on this image to
close
the window, I've noticed that there is a performClick within the
NSControl
class, but I don't seem to be able to set the delegate for this
NSImageView,
like what I have done for my NSWindow and "File;s Owner object", as I
have a
controller object which has some addition interfaces which deal with
appFinishLoading and windowDidBecomeMain methods.
Maybe I have misunderstood how you are suppose to use these
interfaces of
these objects, otherwise I could create an object and inherit from it,
but
this seem like an over kill just to pick up a click.
Thanks
Mark.
_______________________________________________
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.