Duplicate Menu entries when using /USE

Duplicate Menu entries when using /USE

Postby Bernhard » Tue Dec 12, 2017 11:55 am

is the following a bug or a feature?

Experimenting with MultiBugs (see https://github.com/MultiBUGS/MultiBUGS), I find duplicate Menu entries:
DupliMenu0.jpg
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:
DupliMenu.jpg
Duplicate Menu entries (edited)
Bernhard
 
Posts: 55
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany

Re: Duplicate Menu entries when using /USE

Postby Josef Templ » Tue Dec 12, 2017 12:42 pm

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
User avatar
Josef Templ
 
Posts: 1807
Joined: Tue Sep 17, 2013 6:50 am

Re: Duplicate Menu entries when using /USE

Postby Bernhard » Tue Dec 12, 2017 8:18 pm

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
Bernhard
 
Posts: 55
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany

Re: Duplicate Menu entries when using /USE

Postby Josef Templ » Tue Dec 12, 2017 9:08 pm

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
User avatar
Josef Templ
 
Posts: 1807
Joined: Tue Sep 17, 2013 6:50 am

Re: Duplicate Menu entries when using /USE

Postby Bernhard » Tue Dec 12, 2017 9:53 pm

thanks a lot for the clarification.
--
Bernhard
Bernhard
 
Posts: 55
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron