Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassing The DataEnvironment
Message
 
À
30/09/1998 23:18:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00142671
Message ID:
00142697
Vues:
26
>When you create a form or a report with a DE, the CursorSource is
>entered by VFP. In addition, it is RO at design time, but RW at
>runtime. If you move the DBF to another directory the file can't
>be found and VFP issues an error.
>
>For the application I'm writing I have a setup screen which allows
>the user to enter the directory that various files are found in.
>I've been wrinting custom code in the BeforeOpenTables method to
>change the CursorSource.
>
>I'm wondering if it's possible to create a custome DataEnvironment
>class which could be automatically used with each form or report
>that I create.
>
> ...kt

As Eric said, Codebook uses DataEnvironments that are defined in code. There are lots of advantages to this, like the behavior you're researching, the ability to shift from one dataset to another on the fly.

An updated and free version of Codebook is available at www.flashcreative.com . It comes with a builder that will create the DataEnvironment class and cursor classes for you.

For an explanation of code DataEnvironments , see the download page of my Web: there's a PPT on this very subject. And for the details, follow the link to the Savvy site.

José
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform