Page 2 of 5

Re: issue-#135 adding hierarchical menus

Posted: Fri Oct 14, 2016 3:19 pm
by luowy
@Josef
it is pity that your code cant work but CpcDropdowm can, with the same menu file,
after replaced "InitSubMenus" with "MakeDropDowns", it do work.
so I think your code has bug.

Re: issue-#135 adding hierarchical menus

Posted: Fri Oct 14, 2016 3:34 pm
by Ivan Denisov
Ivan Denisov wrote:If you want to make new menus order it has sense. I think, that Obx ant Tut can be moved to Help menu.
I realized that my suggestion is bad, because it will break possibility to remove Obx subsystem.

One of the first problem for me is that Linux version also have to support this new issue :(

Re: issue-#135 adding hierarchical menus

Posted: Fri Oct 14, 2016 8:42 pm
by Robert
Josef Templ wrote: Are there any other limitations of CpcDropDown that we could eliminate?
There is a CPC Tool that disables se!ected Menus. It is a useful function, but I think the implementation (it renames files) is primative. Maybe we could incorporate a neater solution into the standard distribution?

Re: issue-#135 adding hierarchical menus

Posted: Sun Oct 16, 2016 7:04 am
by Josef Templ
Robert wrote:
Josef Templ wrote: Are there any other limitations of CpcDropDown that we could eliminate?
There is a CPC Tool that disables se!ected Menus. It is a useful function, but I think the implementation (it renames files) is primative. Maybe we could incorporate a neater solution into the standard distribution?
This is outside CpcDropDown and beyond this issue, I think.

- Josef

Re: issue-#135 adding hierarchical menus

Posted: Sun Oct 16, 2016 7:37 am
by DGDanforth
Josef Templ wrote:Popup and conditional menus now also support nested menus.

Usage is the same as CpcDropDown.
Here is an example menu text. It shows that "CpcDropDown.DropDown" is not required any longer and that it does not hurt either. It uses a keyboard shortcut Ctrl-G and it uses a guard. The command will only be available if a text document has the focus.

MENU "Test"
"nested" "" "$nested" ""
END

MENU "$nested"
"deeply nested" "" "$nested2" ""
END

MENU "$nested2" ("CpcDropDown.DropDown")
"Hello World" "G" "Dialog.ShowMsg('Hello World')" "StdCmds.PasteViewGuard"
END


- Josef
I don't understand this. If CpcDropDown.DropDown is not needed then why have you included it in the menu type for $nested2?

Re: issue-#135 adding hierarchical menus

Posted: Sun Oct 16, 2016 5:25 pm
by Josef Templ
DGDanforth wrote: I don't understand this. If CpcDropDown.DropDown is not needed then why have you included it in the menu type for $nested2?
The intention was to show that the changes of HostMenus work even with
menus that used the CpcDropDown package before. In other words, the
intention was to demonstrate that there are no migration problems of existing menu texts.

- Josef

Re: issue-#135 adding hierarchical menus

Posted: Sun Oct 16, 2016 5:36 pm
by Josef Templ
luowy wrote:@Josef
it is pity that your code cant work but CpcDropdowm can, with the same menu file,
after replaced "InitSubMenus" with "MakeDropDowns", it do work.
so I think your code has bug.
Why does it work for me but not for you?

What version of Windows are you using?
What version of HostMenus are you using?
Do you have CpcDropDown installed and configured in addition to the changed HostMenus?
What is the outcome of the test with CpcDropDown installed?
What is the outcome of the test without CpcDropDown installed?

- Josef

Re: issue-#135 adding hierarchical menus

Posted: Sun Oct 16, 2016 7:58 pm
by DGDanforth
Josef Templ wrote:
luowy wrote:@Josef
it is pity that your code cant work but CpcDropdowm can, with the same menu file,
after replaced "InitSubMenus" with "MakeDropDowns", it do work.
so I think your code has bug.
Why does it work for me but not for you?

What version of Windows are you using?
What version of HostMenus are you using?
Do you have CpcDropDown installed and configured in addition to the changed HostMenus?
What is the outcome of the test with CpcDropDown installed?
What is the outcome of the test without CpcDropDown installed?

- Josef
It doesn't work for me either. I removed the qualifier (CpcDropDown.DropDown).
I do not have CpCDropDown working on my machine which is windows XP.
I am running BB build #704.
When I press ^G when the log file has the focus nothing happens.
When I pull down the Test menu (where I put your menus) I get the message
command error: syntax error
Here is the code I am using for your menus

Code: Select all

MENU "Test"
"nested" "" "$nested" ""
END

MENU "$nested"
"deeply nested" "" "$nested2" ""
END

MENU "$nested2"
"Hello World" "G" "Dialog.ShowMsg('Hello World')" "StdCmds.PasteViewGuard"
END
-Doug

Re: issue-#135 adding hierarchical menus

Posted: Mon Oct 17, 2016 7:04 am
by Josef Templ
Thanks, Doug.
I think I know what it is now.

- Josef

Re: issue-#135 adding hierarchical menus

Posted: Mon Oct 17, 2016 9:41 am
by Josef Templ
fixed.
The tests had a dependency on the order of menus due to a subtle bug in hotkey handling.
Build http://blackboxframework.org/unstable/i ... a1.706.zip contains the fixes.

- Josef