Contextual menus not passing mousedown events
Contextual menus not passing mousedown events
- Subject: Contextual menus not passing mousedown events
- From: "Theodore H. Smith" <email@hidden>
- Date: Wed, 22 Jun 2005 02:15:27 +0100
I'm trying to get a contextual menu working. Like all contextual
menus I've seen, control-click does this:
1) Acts like a normal click, selecting the item.
2) Brings up the contextual menu relevant to the item.
However, what I have, does not do 1), it just does 2)!
I have this simple code in an NSOutlineView subclass:
- (NSMenu *)menuForEvent:(NSEvent *)theEvent {
return [self BuildMyMenu]; // just builds a menu, returns it and
does nothing else!
}
What am I doing wrong? How do I first let the mousedown event pass,
so the row the user clicked on is selected, before opening the menu?
I tried this:
- (NSMenu *)menuForEvent:(NSEvent *)theEvent {
[self mouseDown:theEvent];
return [self BuildMyMenu]; // just builds a menu, returns it and
does nothing else!
}
but that just made the interface even more quirky :)
--
http://elfdata.com/plugin/ Industrial strength string processing,
made easy.
"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."
_______________________________________________
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