Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory objects saved into cursors
Message
De
18/02/2019 11:17:07
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Memory objects saved into cursors
Divers
Thread ID:
01666501
Message ID:
01666501
Vues:
94
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform