B4J Question File.writeMap - View

Lego Jérôme

Member
Licensed User
Is it possible to writeMap with a view like a TabPane and after read this map ?

I try this code :
B4X:
Sub MenuBar_Action
    Dim mi As MenuItem = Sender
If mi.Text = "Exporter le code" Then
        GestionCode.exporterCode
    End If
    
    If mi.Text = "Sauvegarder" Then
        Dim chemin As String = DirUserDefault
        Dim m As Map
        m.Initialize
        m.put("matiere",TabPaneMatiere)
        
        File.WriteMap(chemin,"saveTi2",m)
    End If
End Sub

But with this code i have a error in my log :
B4X:
java.lang.ClassCastException: java.lang.String cannot be cast to javafx.scene.control.TabPane
 

DonManfred

Expert
Licensed User
Longtime User
Is it possible to writeMap with a view like a TabPane and after read this map ?
No.
You only can store infos on how the pane is created but you can not write/restore Objects in this way.
 
Upvote 0
Top