Re: Handling NSMenuItem Selections
Re: Handling NSMenuItem Selections
- Subject: Re: Handling NSMenuItem Selections
- From: "David Piasecki" <email@hidden>
- Date: Tue, 11 May 2004 08:40:00 -0700
Yep, I'm starting to figure out that I can't really do this the way I
want to. I think I'm just going to use the menu to select and then
store the image object I want based on the selection. In other words,
just do away with the dragging.
Thanks,
David
On May 10, 2004, at 7:15 PM, Louis C. Sacha wrote:
Hello...
Behind the scenes, the menus that are displayed in a Cocoa application
are actually Carbon menus. NSMenu and NSMenuItem would probably be
considered closer to the model part of the MVC paradigm, and they
don't really provide any of the user interaction. It would be very
difficult to implement the functionality you are describing.
Also, the behavior you are describing would probably conflict with the
way that standard menus work. Since menus can be accessed by either
clicking and holding down the mouse button while navigating the menu
or by clicking on the menu title to open the menu, dragging would
interfere with normal menu tracking for the first case (or at least
create situations where it would be difficult to determine the correct
behavior).
Louis
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
_______________________________________________
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.