Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Acessing Controls by Reference or Name
Message
From
04/01/2001 10:32:19
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00459325
Message ID:
00459344
Views:
26
THANKS FOR YOUR QUICK ANSWER!

When I say EVAL I say to my porpertie ObjRef ( an array with the obj reference load at the init of the objects ) like this:

Problems begin when I use:

* - Remeber that ObjRef it's an array and there is no EVAL in this process ---
#define _grdDtOf THISFORM.ObjRef("grdDtOf")
lcDummy = _grdDtOf.RECORDSOURCE

To resolve problems I must use
(1st solution)

LOCAL logrdDtOf
logrdDtOf = THISFORM.ObjRef("grdDtOf")

lcDummy = logrdDtOf.RECORDSOURCE

---
(2nd solution)

than I was thinking if this was not to much heavy and wating for an answer of the Universal Thread I put this:

* - Using all "PATH"
#define _grdDtOf THISFORM.cntRegisto.grdDtOf

lcDummy = _grdDtOf.RECORDSOURCE

---
(3nd solution)

and I'm thinking put the defines in includes. Is this wath tou mean with #define macros?

The cost of menagement decrease with this solution, but if I use the Obj.Reference this will have no costs. Remember that I can put the ObjRef_Acess methode returning not the reference but the "PATH" and than use the macro operator like this:

LOCAL logrdDtOf
logrdDtOf = THISFORM.ObjRef("grdDtOf")

lcDummy = &logrdDtOf..RECORDSOURCE

---

I think I have explain the where I was "walking" better now. Do you still thinking that the best way it's the 2nd solution ( if it's this qhat you mean ) ?

THANKS
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform