Message 1 of 4
point array class property - how?

Not applicable
06-10-2003
08:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
have scoured google for an hour and cant' find a mention of this:
how to store a point value as a property of a class
with this in the declarations section of a class module
Private mWeldDefPt(2) As Double
I tried this: (bombed on class creation)
Property Let DefPt(val() As Double)
mWeldDefPt(0) = val(0)
mWeldDefPt(1) = val(1)
mWeldDefPt(2) = val(2)
End Property
Property Get DefPt() As Double
DefPt(0) = mWeldDefPt(0)
DefPt(1) = mWeldDefPt(1)
DefPt(2) = mWeldDefPt(2)
End Property
then I tried:
Property Let DefPt(val As Variant)
mWeldDefPt(0) = val(0)
mWeldDefPt(1) = val(1)
mWeldDefPt(2) = val(2)
End Property
Property Get DefPt() As Variant
DefPt(0) = mWeldDefPt(0)
DefPt(1) = mWeldDefPt(1)
DefPt(2) = mWeldDefPt(2)
End Property
that allowed the class to be created several times during further debug
testing
but I wasn't accessing the property
as soon as I tried to access the property thus:
in class initialize:
mWeldDefPt(0) = 0
mWeldDefPt(1) = 0
mWeldDefPt(2) = 0
in the calling sub that creates the class:
Debug.Print "DefPt is: " & ws.DefPt(0) & ", " & ws.DefPt(1) & ", " &
ws.DefPt(2)
I got:
got out of stack space error:
then I tried:
Private mWeldDefPt As Variant
and that gives type mismatch on class creation
what's the trick to get a point value as a class property?
how to store a point value as a property of a class
with this in the declarations section of a class module
Private mWeldDefPt(2) As Double
I tried this: (bombed on class creation)
Property Let DefPt(val() As Double)
mWeldDefPt(0) = val(0)
mWeldDefPt(1) = val(1)
mWeldDefPt(2) = val(2)
End Property
Property Get DefPt() As Double
DefPt(0) = mWeldDefPt(0)
DefPt(1) = mWeldDefPt(1)
DefPt(2) = mWeldDefPt(2)
End Property
then I tried:
Property Let DefPt(val As Variant)
mWeldDefPt(0) = val(0)
mWeldDefPt(1) = val(1)
mWeldDefPt(2) = val(2)
End Property
Property Get DefPt() As Variant
DefPt(0) = mWeldDefPt(0)
DefPt(1) = mWeldDefPt(1)
DefPt(2) = mWeldDefPt(2)
End Property
that allowed the class to be created several times during further debug
testing
but I wasn't accessing the property
as soon as I tried to access the property thus:
in class initialize:
mWeldDefPt(0) = 0
mWeldDefPt(1) = 0
mWeldDefPt(2) = 0
in the calling sub that creates the class:
Debug.Print "DefPt is: " & ws.DefPt(0) & ", " & ws.DefPt(1) & ", " &
ws.DefPt(2)
I got:
got out of stack space error:
then I tried:
Private mWeldDefPt As Variant
and that gives type mismatch on class creation
what's the trick to get a point value as a class property?