java.lang.RuntimeException: java.lang.ClassCastException: b4j.example.listcontrol cannot be cast to anywheresoftware.b4a.ObjectWrapper
OK I've done it again. This time I've stripped everything out of the project.
The problem seems to be loading a custom view via a Layout from a class in debug mode (works in release mode).
The small project attached demonstrates.
The ListControl custom view (Which I have stripped out too) works when loaded in a layout from the main module or a Code module (Test 1). The layouts loaded in the app include some, specifically leftlayout2, that work as expected. When I try to load the in a Layout in a class (Test class) the above Class Cast Exception is thrown.
If I remove the references from the Class_Globals to ListControl1 & ListControl2 in Class Test1, the error is not thrown.