json:
[
{Text:"_Archivo", Children:["_Nuevo", "_Guardar", "-", "_Cerrar"]},
{Text:"_Folio",
Children:[
{Text:"_Registrar Nuevo", EventName:"folioRegistrar", Tag: "RNF", Shortcut: {Key: "F2"}},
{Text:"R_evisado", EventName:"atRevisado", Tag: "MRH", Shortcut: {Key: "F6"}},
{Text:"_Cerrado hoy", EventName:"atCerradoH", Tag: "MCH", Shortcut: {Key: "F7"}},
{Text:"Cerr_ado el", EventName:"atCerradoEl", Tag: "MCD", Shortcut: {Key: "F8"}}
]
}
]
Partiendo del ejemplo del foro para la creacion de menus desde el diseñador, copie/adapte este.
El problema es que genera un error a la hora de correr, no encuentro la falla.
LOG:
org.json.JSONException: Expected literal value at character 0 of ]
at org.json.JSONTokener.syntaxError(JSONTokener.java:450)
at org.json.JSONTokener.readLiteral(JSONTokener.java:285)
at org.json.JSONTokener.nextValue(JSONTokener.java:111)
at anywheresoftware.b4j.objects.collections.JSONParser.NextArray(JSONParser.java:77)
at anywheresoftware.b4j.objects.MenuItemWrapper$MenuBarWrapper.parseMenusJson(MenuItemWrapper.java:276)
at anywheresoftware.b4j.objects.NodeWrapper$ControlWrapper.build(NodeWrapper.java:1049)
at anywheresoftware.b4j.objects.TextInputControlWrapper.build(TextInputControlWrapper.java:118)
at anywheresoftware.b4j.objects.TextInputControlWrapper$TextAreaWrapper.build(TextInputControlWrapper.java:212)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.DynamicBuilder.build(DynamicBuilder.java:33)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:142)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:228)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:228)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:228)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:228)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:101)
Esta mal definido el json del menu?
Como deberia ser?
Lo pase por un validador online y da diagnostico de error.
Pero el parser del foro no indica nada raro.
Gracias anticipadas.
Saludos