Re: NSImageView and mouse events
Re: NSImageView and mouse events
- Subject: Re: NSImageView and mouse events
- From: Jeremy Dronfield <email@hidden>
- Date: Tue, 25 Jan 2005 10:19:17 +0000
On 25 Jan 2005, at 4:00 am, Duncan Campbell wrote:
When I replace the NSImageView with an NSButton, I can no longer do
the [self addSubview:] piece
Of course you can. NSButton inherits from NSView and instances of it
can be passed to -addSubview:
- (void)closeIconAction:(NSEvent *)theEvent
The method signature here should be
- (void)closeIconAction:(id)sender
Action methods take sender (i.e. the sender of the action) as their one
and only argument.
In case you are wondering why the NSRect - it's 'cause i am going to
want to add a tracking rect to make close graphic change on
mouse-over.
In that case you will want to use a subclass. That's pretty advanced
for someone only three days into Cocoa...
Regards,
-Jeremy
===================================
SkoobySoft, home of viJournal and Skooby Renamer
email: email@hidden or visit:
http://freespace.virgin.net/jeremy.dronfield/skoobysoft.html
===================================
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden