Quote:
Originally Posted by twobob
The vast majority of the extensions appear to be in the LONGER format.
For the record.
Have to check the changelogs to see that the next version will support both formats.
I kind of recall that it didn't, Might be an awful lot of retro-fitting to be done if that is the case..
Also only the longer format style is the only type that creates the collapsible menus. The other type does not create the ▶
TBC
|
I can reproduce this bug, I'm on it, thank you.
Calling them "long" vs. "short" formats is confusing. They really are different formats. The first format means to create a sub-menu. The second format means to add three top-level items. That's why it doesn't add the ▶
The spoiler includes my explanation of the "proper" menu structure, you might have read it before in README-dev.txt (I don't think I have pushed it to bitbucket yet, but it's reproduced in the KUAL test build thread on knetconnect).
Spoiler:
Code:
Json Menu Structure
-------------------
Going from KUAL 1 (flat menu) to KUAL 2 (nested menu) we face an issue
concerning how to properly describe a menu object with json.
Two slightly different menu templates are in common use.
The first template fully conforms to Yifan Lu's definition[8], e.g.:
{
"items": [
{"name": "Main menu, Item 1", "action": "act1.sh"},
{
"name": "Main menu, Submenu 1",
"items": [
{"name": "Submenu 1, Item 1", "action": "act11.sh"},
{"name": "Submenu 1, Item 2", "action": "act12.sh"}
]
}
]
}
Template 1 provides no explicit way of specifying a main menu label, which
suggests to me that Yifan Lu's intended the Kindle menu button as the main menu,
and when you press it Yifan Lu's launcher displays "Main menu, Item 1" as the
top level item.
Template 2 is a sort of application package menu:
{
"name": "Application 1 menu"
"items": [
{"name": "Application 1 menu, Item 1", "action": "act1.sh"},
{
"name": "Application 1 menu, Submenu 1",
"items": [
{"name": "Application 1 menu, Submenu 1, Item 1", "action": "act11.sh"},
{"name": "Application 1 menu, Submenu 1, Item 2", "action": "act12.sh"}
]
}
]
}
The two templates look almost the same, but a small difference is of great import.
Template 2 (mis)uses the first "name" as a structural element to insert a
submenu - the Application menu - into the main menu.
Notice that with template 2 there is no syntactically valid way to add a single
item at the top level.
KUAL 1 (flat menu series) treats both templates indistinctly, because all menu
items are inserted at the top menu level anyway.
The upcoming KUAL 2 (nestable menu series) ignores all top-level keys but "items".
So it effectively interprets the second template as it interprets the first one.
In KUAL 2, "Application 1 menu, Item 1" displays as a single, top-level menu
entry, just like "Main menu, Item 1".
References
----------
[8] Yifan Lu's original graphical menu for the Kindle
https://github.com/yifanlu/KindleLauncher/blob/master/src/com/yifanlu/Kindle/JSONMenu.java
EDIT: good catch BTW!