Hi guys.
I'm trying to divide ( to conquer) my huge project into several modular modules (lol).
each module will pass an array of tabpages into Main.
I was successful in passing a single tabpage, but am getting casting errors while trying to pass an array of tabpages.
some code:
The returning subs (from a class)
Please Help!!
I'm trying to divide ( to conquer) my huge project into several modular modules (lol).
each module will pass an array of tabpages into Main.
I was successful in passing a single tabpage, but am getting casting errors while trying to pass an array of tabpages.
java.lang.ClassCastException: anywheresoftware.b4j.objects.TabPaneWrapper$TabWrapper cannot be cast to javafx.scene.control.Tab
some code:
B4X:
PreviewPane.Tabs.Add( ButtonNode.PreviewTab) 'This gets a single tabpage, and works great
PropertiesPane.Tabs.AddAll(Array As TabPage( ButtonNode.PropertiesTabs )) ' I have tried many variation of this, including in the returning sub, but no avail
The returning subs (from a class)
B4X:
Public Sub Initialize
' set the Preview Tab
'************************************************
PreviewPane.Initialize("")
PreviewPane.LoadLayout("PreviewPage1")
PreviewPage.Initialize 'This is a single Tabpage to be passed
PreviewPage.Text = "Button"
PreviewPage.Content=PreviewPane
'************************************************
' set the Properties Tabs
'************************************************
Dim PropertiesPane(1) As Pane
Dim PropertiesPage(1) As TabPage
For n = 0 To PropertiesPane.Length - 1
PropertiesPane(n).Initialize("")
PropertiesPage(n).Initialize
PropertiesPage(n).Content=PreviewPane 'This will be an Array of tabPages
Next
PropertiesPane(0).LoadLayout("PropertiesPage1")
PropertiesPage(0).Text = "Background"
'************************************************
End Sub
Public Sub getPreviewTab As TabPage
Return PreviewPage 'This passes 1 tabpage, works OK
End Sub
Public Sub getPropertiesTabs() As TabPage()
Return PropertiesPage 'I have tried several things, cannot pass it as array of tabpages
End Sub
Please Help!!
Last edited: