Re: Responding to Click in an NSImageView? (Newbie)
Re: Responding to Click in an NSImageView? (Newbie)
- Subject: Re: Responding to Click in an NSImageView? (Newbie)
- From: David Remahl <email@hidden>
- Date: Sat, 13 Apr 2002 18:55:49 +0200
>
Hi,
>
It seems NSImageView only sends the action message to my target
>
when I drag and drop an image in to it. How can I get it to respond to
>
a simple click (like a button for instance).
>
FWIW, Im trying to respond to the user clicking in different parts of an
>
image.
>
>
Thanks for any clues.
>
>
Steve
You will need to override mouseDown:...:
- (void)mouseDown:(NSEvent *)theEvent
{
[NSApp sendAction:[self action] to:[self target] from:self];
}
/ David
_______________________________________________
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.