Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15807

[RESOLVED] Strange Class Clone problem

$
0
0
Something very strange going on, which used to work!

I have a class with references to it.
myClass.cls

Code:

LeftClass(5) = new myClass
RightClass(5) = new myClass

When i do:

Code:

LeftClass(2) = RightClass(4).Clone
LeftClass does NOT get copied. All properties have EMPTY STRINGS!!!

VB Mixing up address pointers or something?



Code:

Public Function Clone() As myClass
'Return a copy of this instance
'Create a blank copy
  Set Clone = New myClass
 
  With Clone
      .Name = xName
      .pID = xID
      .Channels = xChannels
  End With
End Function


Viewing all articles
Browse latest Browse all 15807

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>