Possible popup menu bug.

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
Amunrah
Posts: 6
Joined: 21 Sep 2021 19:43

Possible popup menu bug.

Post by Amunrah »

Help.
Maybe I'm doing something wrong. But previously it worked in the custom buttons.

Code: Select all

"Favorites"
  $items = <<<~
    Favfolders|:favs|:favs
    Favfiles|:favfiles|:favfiles
    -
    Comp|:myco|:myco
    User folders|#551|MyIco.ico|1
~;
  popupmenu($items, , , , , , <crlf>, "|");
Now it doesn't work. Nothing happens when you click on menu items. Why?

highend
Posts: 14993
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Possible popup menu bug.

Post by highend »

previously
With which version?
One of my scripts helped you out? Please donate via Paypal

Amunrah
Posts: 6
Joined: 21 Sep 2021 19:43

Re: Possible popup menu bug.

Post by Amunrah »

highend wrote: 22 Mar 2022 12:32
previously
With which version?
Sorry. But for example in version 22.40 it worked. Now the latest version (not worked).

highend
Posts: 14993
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Possible popup menu bug.

Post by highend »

Can confirm it.

It works with XYplorer 22.90.0012 but not 22.90.0100 so either 22.90.0013 (never released to the public) or 22.90.0100 is the culprit...
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66631
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Possible popup menu bug.

Post by admin »

Indeed: The syntax you are using is caption;data;icon;state (or maybe better: caption;command;icon;state ) and it became a victim of the Hamburger revolution. Quietly an alternative syntax command;caption;icon;state had emerged. In order not to break any old code, I now decided to support both ways, and implement some logic that decides whether it's caption;command... or command;caption.... So, it should work again in the next beta.

Amunrah
Posts: 6
Joined: 21 Sep 2021 19:43

Re: Possible popup menu bug.

Post by Amunrah »

admin wrote: 26 Mar 2022 09:24 Indeed: The syntax you are using is caption;data;icon;state (or maybe better: caption;command;icon;state ) and it became a victim of the Hamburger revolution. Quietly an alternative syntax command;caption;icon;state had emerged. In order not to break any old code, I now decided to support both ways, and implement some logic that decides whether it's caption;command... or command;caption.... So, it should work again in the next beta.
Thank you so much, it works now.

admin
Site Admin
Posts: 66631
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Possible popup menu bug.

Post by admin »

1a. I'd say the recommend item syntax in a Hamburger now is this:
command (can be: menu command, toolbar button, script, path, URL)
and it will control the action, the caption, and the icon of the menu item.

1b. You can optionally customize the caption, the icon, and the state by adding these fields:
command[;caption;icon;state]

2. For backward compatibility, this old syntax is currently still tolerated (and it will be used when the 2nd field *looks like* a command ... I know this can mean trouble):
caption;command;icon;state

xy123
Posts: 217
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

Re: Possible popup menu bug.

Post by xy123 »

admin wrote: 27 Mar 2022 09:41 1b. You can optionally customize the caption, the icon, and the state by adding these fields:
command[;caption;icon;state]
Except for script command, right? For script command only caption;/icon;command; works?

Code: Select all

::Hi;/some.ico;echo "hi!";

admin
Site Admin
Posts: 66631
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Possible popup menu bug.

Post by admin »

Yes, scripts are a necessary exception because they use the ";" separator as part of the script syntax.

Post Reply