User`s guide

D Utility Library
D-22
Example. The following Visual Basic example illustrates the difference between
assignment and
Clone for MWStruct objects.
Sub foo ()
Dim x1 As MWStruct
Dim x2 As MWStruct
Dim x3 As MWStruct
On Error Goto Handle_Error
Set x1 = new MWStruct
x1("name") = "John Smith"
x1("age") = 35
'Set reference of x1 to x2
Set x2 = x1
'Create new object for x3 and copy contents of x1 into it
Call x1.Clone(x3)
'x2's "age" field is also modified 'x3's "age" field unchanged
x1("age") = 50
.
.
.
Exit Sub
Handle_Error:
MsgBox(Err.Description)
End Sub
Class MWField
The MWField class holds a single field reference in an MWStruct object. This
class is noncreatable and contains four properties/methods:
Property Name As String on page D-22
Property Value As Variant on page D-23
Property MWFlags As MWFlags on page D-23
Sub Clone(ppField As MWField) on page D-23
Property Name As String
The name of the field (read only).