Duplicate Menu entries when using /USE

Post Reply
Bernhard
Posts: 68
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany

Duplicate Menu entries when using /USE

Post by Bernhard »

is the following a bug or a feature?

Experimenting with MultiBugs (see https://github.com/MultiBUGS/MultiBUGS), I find duplicate Menu entries:
Duplicate menu entries (org)
Duplicate menu entries (org)
if I edit it via (second) Info->Menus and change the legend of menu item "Tools" to BUGS:Tools it looks as follows:
Duplicate Menu entries (edited)
Duplicate Menu entries (edited)
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Duplicate Menu entries when using /USE

Post by Josef Templ »

It seems that this (impressive tool) is intended to be run as a standalone application.

When mixing in the many subsystems into the standard BlackBox distribution there are
ambiguities leading to duplicate menu entries.

If you want to avoid the duplication, you probably have to provide two System/Rsrc/Menus.odc files and
a command for switching between them depending on what you want to see,
the BUGS application menu or the BlackBox standard menu.

In your customized menus file avoid the line

Code: Select all

INCLUDE "*"
because that line includes all menus of subsystems not yet included.

- Josef
Bernhard
Posts: 68
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany

Re: Duplicate Menu entries when using /USE

Post by Bernhard »

Josef Templ wrote:It seems that this (impressive tool)
absolutely impressive, but not my work
is intended to be run as a standalone application.
yes. It looks like.
When mixing in the many subsystems into the standard BlackBox distribution there are
ambiguities leading to duplicate menu entries.
As far as I understood the /USE option, which was originally intended for a global (read only)
installation of BB, it should provide a kind of lookup path, i.e. look first in the path given
by the /USE argument and if not found look in the path where the main (i.e. normally
BlackBox) EXE file was found. In this case the /USE path would "black out" the file from
the EXE path. But this seems to be handled differently for the menu files.
Please understand me right: I like the feature that the menus from the EXE path
are displayed also, but I am a little bit surprised by the fact of duplicate entries.
If you want to avoid the duplication, you probably have to provide two
System/Rsrc/Menus.odc files and a command for switching between them
depending on what you want to see, the BUGS application menu or the
BlackBox standard menu.
I do not understand your suggestion.
In your customized menus file avoid the line

Code: Select all

INCLUDE "*"
because that line includes all menus of subsystems not yet included.
Is the INCLUDE the cause of the duplication?

--
Bernhard
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Duplicate Menu entries when using /USE

Post by Josef Templ »

The /USE option works as you described it, also for menu files.

The special point here is that there are several subsystems with different names, i.e. different folders,
but they are using identical menu entry names, for example Info.
This menu is introduced in System/Rsrc/Menus.odc of MultiBUGS and in the standard subsystem Dev,
which is included by means of a wildcard include (INCLUDE "*") in System/Rsrc/Menus.odc of MultiBUGS.

BlackBox does not merge multiple menus with the same name into a single menu but introduces multiple menus.
This is a simple strategy. It avoids the problem of finding an appropriate order of merged menu items.
For simple tests this may be irrelevant, but in the general case it is a problem.

- Josef
Bernhard
Posts: 68
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany

Re: Duplicate Menu entries when using /USE

Post by Bernhard »

thanks a lot for the clarification.
--
Bernhard
Post Reply