Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Custom.dataenvironment.crash
Message
De
17/06/1999 16:32:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00230749
Message ID:
00231083
Vues:
17
Terry,

It's not a form container.

Try something this with the custom class Init:

WITH This

.AddPropery([oSession], .NULL.)
.oSession = CREATEOBJECT([Session])
.oSession.AddProperty([oDataEnvironment], .NULL.)
.oSession.oDataEnvironment = CREATEOBJECT([DataEnvironment])

*!* Now you can add your cursors

WITH .oSession.oDataEnvironment

.AddObject([Cursor1], [Cursor])
*!* blah, blah, blah

ENDWITH

ENDWITH


>In the init event of a subclass of the custom object from _base.vcx, I have the following code:
>
>this.addobject("de","dataenvironment")
>this.de.addobject("cursor1","cursor")
>this.de.cursor1.alias="custs"
>this.de.cursor1.cursorsource="customers"
>this.de.cursor1.database="cc"
>this.de.cursor1.nodataonload=.f.
>
>I get the error:
>"Object class is invalid for this container" upon attempting to instantiate the dataenvironment object.
>
>I have tried using the container class instead of the custom class with the same results.
>
>I heard this can be done. Does anyone know what I am doing wrong here?
>TIA
- Jeff
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform