From: Tomas M <tomas at slax.org>
Date sent: Thu, 6 Sep 2012 12:56:46 +0200
To: For discussion of Syslinux and tftp-hpa <syslinux at zytor.com>
Subject: [syslinux] Menu system bug - MENU DEFAULT not working
Send reply to: For discussion of Syslinux and tftp-hpa <syslinux at
zytor.com>
<mailto:syslinux-request at zytor.com?subject=unsubscribe>
<mailto:syslinux-request at zytor.com?subject=subscribe>
> Hello,
> I'm reporting a bug, see attached syslinux.cfg
>
> I'm using submenu entries to emulate checkbox inputs.
> The idea is simple, there are submenus generated for all possible cases,
> and each Enter keypress loads appropriate submenu section.
>
> The logic of the menu is correct. Just syslinux has some bug.
> It doesn't set MENU DEFAULT properly for all submenus.
>
> If your first Enter keypress is on OptionA, it will work.
> However if your first Enter keypress is on OptionB for example,
> it loads correct submenu (01001) but doesn't set the MENU DEFAULT
> - in this submenu, menu default is set to second row, but syslinux
> puts cursor on the first row.
>
>
> Any ideas how to fix that?
>
> Thank you!
>
>
> Tomas M
> slax.org
>
I think first you might want to test if the problem is somehow
related to the number of submenus. I think there was some limit, but
I don't know if this is still an issue.
The reason it works for the first option is because that's the
default behavior when "MENU DEFAULT" is not used.
Have you tried using correct unique labels? For example:
MENU BEGIN 00000
MENU START
LABEL 00000_10000
MENU DEFAULT
MENU LABEL [ ] OptionA this=00000 next=10000
MENU GOTO 10000
LABEL 00000_01001
MENU LABEL [ ] OptionB this=00000 next=01001
MENU GOTO 01001
LABEL 00000_00102
MENU LABEL [ ] OptionC this=00000 next=00102
MENU GOTO 00102
LABEL 00000_00013
MENU LABEL [ ] OptionD this=00000 next=00013
MENU GOTO 00013
MENU END
...
...
...
MENU BEGIN 01001
LABEL 01001_11000
MENU LABEL [ ] OptionA this=01001 next=11000
MENU GOTO 11000
LABEL 01001_00001
MENU DEFAULT
MENU LABEL [*] OptionB this=01001 next=00001
MENU GOTO 00001
LABEL 01001_01102
MENU LABEL [ ] OptionC this=01001 next=01102
MENU GOTO 01102
LABEL 01001_01013
MENU LABEL [ ] OptionD this=01001 next=01013
MENU GOTO 01013
MENU END
Of course the above label "format" is just for the example, and you
might want to use something different.