Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not possible to scan dataenvironment objects!?
Message
From
18/06/1999 15:27:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Not possible to scan dataenvironment objects!?
Miscellaneous
Thread ID:
00231556
Message ID:
00231556
Views:
58
I have forms with tables in their Dataenvironment.
At form design time, VFP stores relative path of those cursors into cursor CursorSource. property

I need to change CursorSource property because at run-time, files are at different locations.
The only reasonable place to do it seems to be BeforeOpentables event.
However, it is not possible to loop through cursors: dataenvironment does not have objects collection and cursor object names are changed.

Is there a way to do this?

Currently I use the followin code in BeforeOpenTables.
But cursor names are changed sometimes, so this will not work:

i = 1
do while type('this.Cursor'+ltri(str(m.i))+'.name' ) = 'C'
local lobj
lobj = eval( 'this.Cursor'+ltri(str(m.i)) )
if type( 'o.CursorSource')='C'
o.CursorSource = 'c:\mypath'
endif
i = i + 1
enddo
Andrus
Next
Reply
Map
View

Click here to load this message in the networking platform