Hi,
Now I maybe know why I am a little confused.
I have taken this part from your code:
For Each m As String In Array As String("a", "b", "c")
Dim mm As MenuItem
mm.Initialize(m, "mm")
mnuComPort.MenuItems.Add(mm)
Next
and put into mine.
This works only in "Release" not "Debug"
In debug:
Program started.
WARNING: com.sun.javafx.css.StyleHelper calculateValue Could not resolve '-fx-text-base-color' while resolving lookups for '-fx-text-fill' from rule '*.combo-box *.list-cell' in stylesheet jar:file:/C:/Program%20Files%20(x86)/Java/jdk1.7.0_45/jre/lib/jfxrt.jar!/com/sun/javafx/scene/control/skin/caspian/caspian.bss
Error occurred on line: 95 (main).
java.lang.RuntimeException: Method: getMenuItems not found in: anywheresoftware.b4j.objects.MenuItemWrapper
at anywheresoftware.b4a.shell.Shell$MethodCache.getMethod(Shell.java:718)
at anywheresoftware.b4a.shell.Shell.getMethod(Shell.java:381)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:467)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:209)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:69)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at lp.diagnostics.main.start(main.java:33)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:216)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
at java.lang.Thread.run(Thread.java:744)
Mogens