The function LoadObjectTree deserializes a variant containing a serialized object tree created by ObjectTreeSerialize (attribute function of TCE object).
Syntax | ||||
LoadObjectTree(Data) | ||||
Return value | ||||
Type |
Description | |||
Result |
TCE Object | |||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Required |
Data |
Variant |
ByVal |
Serialized object tree. |
Example:
Save an object tree of object Product to client-side file:
Dim V As Variant, FS As TCEWindows.FileSelect, FN As String
FS := Client.CreateObject("TCEWindows.FileSelect")
FS.Filter := Dialog.Filter # "TCE Configuration (*.tce)||*tce"
If FS.ShowSave(MainForm.hwnd) Then
FN := FS.FileName
FN &= ".tce" If LCase(Right(FN, 4)) <> ".tce"
V := Product.ObjectTreeSerialize
Server.TransactStreamToClient(FN, V)
End If
Load an object tree to object Product from client-side file using LoadObjectTree
Dim V As Variant, FS As TCEWindows.FileSelect
FS := Client.CreateObject("TCEWindows.FileSelect")
FS.Filter := Dialog.Filter #"TCE Configuration (*.tce)||*.tce"
If FS.ShowOpen(MainForm.hwnd) Then
Client.TransactFileToStream(FS.FileName, V)
Product := LoadObjectTree(V)
End If