Re: Handling NSMenuItem Selections
Re: Handling NSMenuItem Selections
- Subject: Re: Handling NSMenuItem Selections
- From: "David Piasecki" <email@hidden>
- Date: Mon, 10 May 2004 14:16:43 -0700
I see. [sender title] gives me the title of what I clicked on, and I
can set a tag to an index value if I want. That's perfect for selecting
items from the menu.
Any ideas on how I might drag an image from the menu item onto my
NSView? I looked at the documentation for NSMenuItem and NSMenu, and I
didn't see anything in there regarding overriding a mousedown action.
David
On May 10, 2004, at 12:30 PM, Jeremy Dronfield wrote:
You can identify it by its tag or title: [sender tag] or [sender
title] in the menu item's action method. (Use -setTag: to give your
item a tag when you create it.)
Regards,
-Jeremy
===================================
SkoobySoft, home of viJournal
email: email@hidden or visit:
http://freespace.virgin.net/jeremy.dronfield/skoobysoft.html
===================================
On 10 May 2004, at 7:00 pm, David Piasecki wrote:
I added NSMenuItems to an NSMenu via code instead of IB. When I click
on the NSMenuItem, I need a way of knowing which NSMenuItem I clicked
on.
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.
_______________________________________________
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.