>>>Is there a way to save an object reference into a cursor? Something like this:
>>>
>>>
lo = CREATEOBJECT("Form")
>>>CREATE CURSOR c_example (oData g)
>>>INSERT INTO c_example (oData) VALUES(lo)
>>>
>>>SCAN
>>> c_examples.oData.BackColor = RGB(255,255,0)
>>>ENDSCAN
>>>
>>>
>>>
>>>The only way I know how to do it is in some way like this when going through a table:
>>>
lo = CREATEOBJECT("Form")
>>>CREATE CURSOR c_example (cDataObj c(20))
>>>
>>>lcName = SYS(2015)
>>>PUBLIC &lcName
>>>&lcName = lo
>>>INSERT INTO c_example (cDataObj) VALUES(lcName)
>>>
>>>SCAN
>>> lcObj = ALLTRIM(cDataObj)
>>> &lcObj..BackColor = RGB(255,255,0)
>>>ENDSCAN
>>>
>>>
>>>Is there a way to do it through objects?
>>
>>Basically yes, but it's several hundred lines of code in some class.
>>The idea is to use AMEMBERS to parse the object, TRASNSFORM / PADL to create text that could be used as VFP prg to create the parameters.
>>Tricky is child objects, collections and circular references.
>
>I'm looking for a way to reference memory objects that are live in memory, instantiated, viable, able to be called, but to reference them later, not now, meaning in a few minutes while they are still live and viable.
>
>In C/C++ I would store a reference to the pointer in a memory structure, or save the memory address to a disk file and then reconstitute the pointer by decoding the address. I don't know of a way to do this in VFP, and I'm needing it. :-)
>
>So far the PUBLIC SYS(2015) variable form is working, but it's clunky as it creates lots of PUBLIC variables.
>
>>The product of it is a text block that could be run with EXECSCRIPT
>>
>>I use it to store form settings of any sort.
>>
>>See if you can create it. Otherwise I would need to export in a sort of VFPX project.
>>
>>Lutz
>>
>>Update
>>And I run into problems with decimal lenght, SET POINT, type of property with .NULL. value and so on.
A reference to a pointer still points to the same object.
To copy it means to do the same as within the last message, but creating empty/objects collections and create properties on the fly iwth ADDPROPERTY
To restore use the very same code. ADDPROPERTY on a property existing simply changes the value of the property.
Same problems as above, except you don't need to care about SET POINT etc.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]