Pretty much copied from the example.
'load MENU the layout to Root
Drawer.Initialize(Me, "Drawer", Root, 200dip)
Drawer.CenterPanel.LoadLayout("Main")
Drawer.LeftPanel.LoadLayout("MainPageMenu")
[/CODE]
MainPageMenu has a CLV and the CLV_ItemClick event works just fine.
BUT
I added a button and a B4XSwitch (on a pane) from a layout to the CLV.
I added Button_Click and Sw_ValueChanged events to the Main Page from designer but these events do not fire.
The events are trapped because the CLV_ItemClick does not fire if you click the button or the switch.
Clicking the button does nothing, clicking the switch gives the following error.
Any help appreciated.
'load MENU the layout to Root
Drawer.Initialize(Me, "Drawer", Root, 200dip)
Drawer.CenterPanel.LoadLayout("Main")
Drawer.LeftPanel.LoadLayout("MainPageMenu")
[/CODE]
MainPageMenu has a CLV and the CLV_ItemClick event works just fine.
BUT
I added a button and a B4XSwitch (on a pane) from a layout to the CLV.
I added Button_Click and Sw_ValueChanged events to the Main Page from designer but these events do not fire.
The events are trapped because the CLV_ItemClick does not fire if you click the button or the switch.
Clicking the button does nothing, clicking the switch gives the following error.
B4X:
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Exception: Sub adminmodesw_valuechanged was not found.
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:496)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:467)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:541)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: java.lang.Exception: Sub adminmodesw_valuechanged was not found.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:120)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:487)
... 9 more
Caused by: java.lang.Exception: Sub adminmodesw_valuechanged was not found.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:98)
... 11 more
Any help appreciated.