Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the previous object state
Message
 
To
06/12/2001 00:55:28
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00590354
Message ID:
00590356
Views:
26
>I have a recursive logic for my object. It goes like this:
>
>
>LOCAL loList
>loList=CREATEOBJECT('FournierTransformationList')
>loList.Method()
>...
>IF ...
>   This.RecursiveMethod()
>ENDIF
>
>FUNCTION RecursiveMethod
>LOCAL loList
>loList=CREATEOBJECT('FournierTransformationList')
>...
>
>
>Is there a way, once I am in the RecursiveMethod() to fill loList with the current object such as:
>
>
>FUNCTION RecursiveMethod
>LOCAL loList
>loList=CREATEOBJECT('FournierTransformationList')
>loList=This.AllProperties()
>
>
>without having to do this:
>
>
>FUNCTION RecursiveMethod
>LOCAL loList
>loList=CREATEOBJECT('FournierTransformationList')
>loList.Property1=This.Property1
>loList.Property2=This.Property2
>...
>
Scatter and Gather from/to objectName can do the trick if you have a table with the fields names that match your properties names...

HTH
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform