Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the CursorSource in the DataEnvironment
Message
From
08/07/1998 12:52:13
 
 
To
07/07/1998 22:41:35
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00115080
Message ID:
00115351
Views:
15
>>>YOu change the cursor's database property it with form code in the dataenvironment's beforeopentables event.
>>
>>I'm sorry Erik, that was kind of vague. My understanding is that
>>as soon as the cursor object is instatiated, the table is opened.
>>Is this not the case? You said 'database property', am I correct
>>in assuming that you meant the CursorSource, or is there another
>>property which I should be looking at (these are free tables).
>>
>>Thanks for your response.
>>
>
>I guess it was a little vague. And you are correct, the database property is of no consequence to you since you are using free tables.
>
>That the table is opened when the cursor object is instanciated is only partially correct. AS members of the DE, cursor objects are instanciated, but their tables are not opened until after the form.dataenvironment.beforeopentables event. That's why this is the perfect place to put this code (it can also go in DE.init or form.load).
>
>The common way to do this is to check the value of a global variable or an application object's property that tells your DE where your tables are, and then loop through the cursor objects in the DE, changing the cursorsource property accordingly.
>
>Hope I was a little clearer.

Yes, much.

I thought about it some more after I got home then broke out
the old notebook and tried a little test program based on you
prior post and that helped clear it up a bit too.

Now the only thing I'm having trouble with is determining the
Cursor objects within the DE. I've tried AINSTANCE( x, 'Cursor'),
This.Controls( I), but don't know how to make a generic reference
to all of the member objects in a container (the DE IS a
container isn't it?)

Thanks again for you help...
...kt
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform