Page 1 of 1

Is it me (again) or is this a real bug?

Posted: 27 Jun 2012 21:48
by aurumdigitus
The goal here was to have both "Close Drive"s in bold type. After working for longer than can be believed was unable to get Close D bold to display. After much hair pulling discovered if the |1 are deleted the code works.

So this this a real bug at large or some arcane syntax violation?

Code: Select all

//Before - does not work
"Close Drive C|C:|1"
  goto "C:\" ; #1009;
"Close Drive D|D:|1";
    goto "D:\" ; #1009;
//After - presto, now it does work
"Close Drive C|C:"
  goto "C:\" ; #1009;
"Close Drive D|D:";
    goto "D:\" ; #1009;

Re: Is it me (again) or is this a real bug?

Posted: 27 Jun 2012 21:55
by TheQwerty
It's not a bug, just a misunderstanding.

The 1 state makes the item the default, which in turn makes it bold, but there can be only one default item in a menu.

Since script menus don't really have a default trigger, the usage of the state is a bit abused to enable making one item bold.


The default state is really more useful when showing the menu of a toolbar button as the bold item is typically the one that happens when you left-click a button, hence the default, and the menu is only shown when right-clicking.

Re: Is it me (again) or is this a real bug?

Posted: 27 Jun 2012 22:03
by aurumdigitus
And again, thank you TheQwerty for the lucid explanation about the "misunderstanding".

So it wasn't really me or a bug.

Still, you have to admit this one gets into some pretty tall grass. :whistle:

Re: Is it me (again) or is this a real bug?

Posted: 27 Jun 2012 22:13
by TheQwerty
aurumdigitus wrote:Still, you have to admit this one gets into some pretty tall grass. :whistle:
Indeed, this one had me very confused and frustrated at one time. :?

The help could probably explain this better since it doesn't explain what it means by default state. The example doesn't help either since it leads the user to think it just means "bold" and even hints that it might be possible to have multiple default items at once:

Code: Select all

"Go C:|C:|1" goto "C:\";  //shown bold
"Go D:|D:|2" goto "D:\";  //shown checked
"Go E:|E:|3" goto "E:\";  //shown bold and checked
It also forgets to demo disabled.