When you create a custom view with B4A v5.8 (menu Project > Add new module > Class module > CustomView), this "view" is not really a view, so you get an error when you do things like:
Dim MyView As clsMyCustomView = MyPanel.GetView(0)
This is not a bug. CustomViews are not views. This was always the case.
One way to get a reference to clsMyCustomView instance is by adding it as a tag to the base panel (or the main view if you are not using the base panel):
B4X:
Sub DesignerCreateView (...)
Base.Tag = Me
...
End Sub
B4X:
Dim MyView As clsMyCustomView = MyPanel.GetView(0).Tag
This is not a bug. CustomViews are not views. This was always the case.
One way to get a reference to clsMyCustomView instance is by adding it as a tag to the base panel (or the main view if you are not using the base panel):
B4X:
Sub DesignerCreateView (...)
Base.Tag = Me
...
End Sub
B4X:
Dim MyView As clsMyCustomView = MyPanel.GetView(0).Tag