Page 1 of 1

[BUG] WB "Tools" menu does not reduce in size

Posted: Fri Dec 09, 2011 12:15 am
by chris
After adding a long entry to the WB Tools menu and removing it, the Tools menu does not shrink back to the original size.

Running this ARexx script should reproduce the fault:

Code: Select all

/* ARexx AppMenu test */

ADDRESS WORKBENCH
MENU ADD NAME menu1 TITLE "thisisquitealongappmenutitle" CMD "C:RequestChoice TITLE Test BODY Test GADGETS OK"
SAY "Press Return to remove the AppMenu item"
PARSE PULL
MENU REMOVE NAME menu1
Also, unless I'm doing something wrong, the command isn't running when the menu item is selected either.

Re: [BUG] WB "Tools" menu does not reduce in size

Posted: Fri Dec 09, 2011 9:16 am
by thomasrapp
Also, unless I'm doing something wrong, the command isn't running when the menu item is selected either.
Your command is not enclosed in quotes. The quotes you entered surround the Rexx string but are not sent to Workbench.

Either so:

Code: Select all

MENU ADD NAME menu1 TITLE "thisisquitealongappmenutitle" CMD """C:RequestChoice TITLE Test BODY Test GADGETS OK"""
or so:

Code: Select all

MENU ADD NAME menu1 TITLE "thisisquitealongappmenutitle" CMD '"C:RequestChoice TITLE Test BODY Test GADGETS OK"'
or so:

Code: Select all

"MENU ADD NAME MENU1 TITLE thisisquitealongappmenutitle CMD ""C:RequestChoice TITLE Test BODY Test GADGETS OK"""
or so:

Code: Select all

'MENU ADD NAME MENU1 TITLE thisisquitealongappmenutitle CMD "C:RequestChoice TITLE Test BODY Test GADGETS OK"'

Re: [BUG] WB "Tools" menu does not reduce in size

Posted: Sat Dec 10, 2011 12:35 am
by chris
thomasrapp wrote:
Also, unless I'm doing something wrong, the command isn't running when the menu item is selected either.
Your command is not enclosed in quotes. The quotes you entered surround the Rexx string but are not sent to Workbench.
Ah, yes, of course, thanks! Anyway, the only reason I wrote that was to demonstrate the Tools menu bug... :-)

Re: [BUG] WB "Tools" menu does not reduce in size

Posted: Sat Dec 10, 2011 1:46 am
by xenic
chris wrote:
thomasrapp wrote:
Also, unless I'm doing something wrong, the command isn't running when the menu item is selected either.
Your command is not enclosed in quotes. The quotes you entered surround the Rexx string but are not sent to Workbench.
Ah, yes, of course, thanks! Anyway, the only reason I wrote that was to demonstrate the Tools menu bug... :-)
I can't reprocuce the problem. I add HyperClock to my Tools menu as part of my AddTools script that adds a lot of WorkBench menus from WBStartup. I just removed the HyperClock menu item and the menu adjusted back to the correct size. Also, TurboText always adds a Tools menu when I open it and removes it when I quit TurboText. The Tools menu always adjusts to the correct size for the remaining items (3). How many items are normally in your Tools menu?

Re: [BUG] WB "Tools" menu does not reduce in size

Posted: Sat Dec 10, 2011 11:22 am
by chris
xenic wrote: The Tools menu always adjusts to the correct size for the remaining items (3). How many items are normally in your Tools menu?
Normally only ResetWB. I've just tried my script with something else already present in the menu, and you're right - it adjusts back to the correct size. So it looks like it is only when the last item is removed that the size doesn't change.

Re: [BUG] WB "Tools" menu does not reduce in size

Posted: Sat Dec 10, 2011 12:42 pm
by Rigo
I can confirm this anomoly. Unfortunately, the workbench.library code is so convoluted, I just can't follow it enough to track what it's doing and where this fault may lie. I'll put it on the bugtracker, and just hope that someone with a decent amount of knowledge in this source can find and fix it.

Simon

Re: [BUG] WB "Tools" menu does not reduce in size

Posted: Sat Dec 10, 2011 4:32 pm
by chris
Thanks!

Re: [BUG] WB "Tools" menu does not reduce in size

Posted: Sat Dec 10, 2011 7:04 pm
by samo79
@Rigo

I will suggest you send every GUI problem in general to Tantignone :)