Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory objects saved into cursors
Message
From
18/02/2019 11:17:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Memory objects saved into cursors
Miscellaneous
Thread ID:
01666501
Message ID:
01666501
Views:
93
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?
Next
Reply
Map
View

Click here to load this message in the networking platform