Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sub-Classed Objects
Message
De
06/11/2003 16:57:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/11/2003 15:03:31
Chad Ashpole
Ads Information Systems, Inc.
Minneapolis, Minnesota, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00847311
Message ID:
00847385
Vues:
15
In VFP6, a DataEnvironment doesn't get inherited. The DataEnvironment gets lost in the derived class.

If you need to open tables, set relations, filters, or activate an index, place commands in the Form.Load() event.

Relevant commands: USE; SET ORDER; SET FILTER; SET RELATION; SELECT

>FoxPro v6.0
>
>I have created a class called BASEFORM which is a sub-class of a VFP form. I have a few custom events for this form. One event that fires before the form closes has the following statement: oDataObject = THISFORM.DataEnvironment
>
>I have create another class called ENTRYFORM based off of my BASEFORM sub-class with more custom events and code.
>
>In a program I have a DEFINE CLASS MyForm AS ENTRYFORM. I use a CREATEOBJECT command to create a new instance of the class. Everything appears to work fine except when I close my form I receive an error 'Property DataEnvironment not found'. It's running the BASEFORM code but why would that code be causing an error? Is it because FoxPro thinks that the ENTRYFORM class is the parent class when it should be thinking that the BASEFORM is the parent class? Is there a way I can sub-class the ENTRYFORM class and have FoxPro use BASEFORM as my parent class instead on ENTRYFORM? Please advise.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform