Hello,
I am running into an exception whenever I try to select an item from a
pull down menu. The situation is reproducable if certain conditions are
fulfilled:
- some menu items must have strings as values
- the user interface look must be set to one of Windows 95/98/XP
- the menu must be long enough so that it will not fit between the
position of the menu widget and the lower border of the screen when
being opened
- a menu item containing a string must be selected
This error did not happen with VW7.4.1. I tried to dig into the code and
looking into the differences I have found out that class
Win95MenuFromMenuButtonController has a new instvar. It is used to
prevent the menu from being closed when the user releases the mouse button.
Everything is working well as long as the menu item gets opened at its
original position (see Win95MenuView>>openFromMenuButton:). If the menu
window needs to be moved to fit to the screen (line 'menuWindow moveTo:
menuWindow globalOrigin + intoMonitor') then the exception will be
raised afterwards.
I have reimplemented UI.MenuButtonController>>pullDownAction in
UI.Win95MenuButtonController using a very ugly workaround but this is
only a cure of the symptom ;-)
The attached source code file can be filed in using a vanilla VW7.5
image. Evaluate 'TestMenuButton open' and choose one of the string menu
items to get the exception.
Has anybody else encountered that problem and solved it?
Thanks
Michael
JETZT die neueste Version des Windows Live Messenger downloaden!
Hier klicken!