Re: Handling NSMenuItem Selections
Re: Handling NSMenuItem Selections
- Subject: Re: Handling NSMenuItem Selections
- From: "Louis C. Sacha" <email@hidden>
- Date: Mon, 10 May 2004 19:15:05 -0700
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.