chh9@quads.uchicago.edu (Conrad Halton Halling) (03/13/91)
A bug in HyperCard 2.0v2. The bug: If you have the screen locked and you delete the rightmost menu of the menuBar and create a menu with a name that is the exact same length in Chicago font, the menuBar is not updated correctly. A demonstration: Create a stack with one card. Background field 1: Set the textfont to Chicago. This field identifies what the name of the last menu should be. Background button 1 "Change menu" on mouseUp lock screen if the name of the last menu is "Index" then delete menu "Index" create menu "About" else if the name of the last menu is "About" then delete menu "About" create menu "Index" end if put "The last menu is " & the name of the last menu into fld 1 end mouseUp When the card is ready, type create menu "Index" into the message box to create the first menu correctly. Now, click on button "Change menu". The name of the last menu on the menuBar remains "Index", but fld 1 reports that its name is "About". Click on the menu that says "Index". When it is highlighted, the name changes to "About". When you release the mouse button, the name changes back to "Index". Next, comment out the "lock screen" line of the mouseUp handler of bg btn "Change menu". Click on the button to change the menu. The name of the last menu is changed correctly. A question: I want to keep the screen locked, so I can't simply solve the problem by unlocking the screen. If I use a menu named "About " (note the trailing space character), will there be any problem? Such a name changes the length of the name of the menu and causes the menuBar update to occur correctly. But will this have any side-effects I should watch out for? -- Con Halling chh9@midway.uchicago.edu