Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory objects saved into cursors
Message
De
18/02/2019 12:22:02
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
18/02/2019 11:17:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01666501
Message ID:
01666504
Vues:
57
>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.

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.
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.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform