[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix: NSMenu.m, -performActionForItemAtIndex:
From: |
Georg Fleischmann |
Subject: |
Re: Fix: NSMenu.m, -performActionForItemAtIndex: |
Date: |
Fri, 14 Jun 2002 21:15:04 GMT |
Hi Nicola,
> thanks - looking at the code and API, wouldn't maybe be better that
> -performActionForItemAtIndex: does not perform any highlighting, and the
> caller performs it instead ?
>
> do you think it would be a good change ?
The performAction is called from [NSMenuView -trackWithEvent:] (for mouse
actions), and it's important that the item will be selected before the action
is performed.
The key action comes directly from [NSPopUpButton -keyDown:].
This would mean more than one place to perform the action and still a check
for PopUpButton.
Apple seems to have removed the NSMenuView from their menu code completely.
Probably it was just too confusing. Does this mean Apple is back to the
OpenStep implementation of menus/popup-menus ?
Note: NSMenuItemCell and NSMenuView are deprecated and are no longer used to
draw menus. Calling their methods will not affect the appearance of your menus.
Georg