Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add Tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00084113
Message ID:
00084630
Vues:
46
Hi Eric,
You mention being unable to save the DE with a form class. Unfortuantely VFP does not allow a form class to be saved with a DE, only form instances(scx's). Not sure why your AddObject("DataEnvironment"... failed at runtime.
HTH
Ned
> As the battle rages on, I seem to be getting nowhere...
>
>I'm encountering a host of problems with forms. When run as a normal .scx from the project manager myform returns: "The data source for this object must be variable reference"
>
>use mytable in 0 alias dummy
>thisform.Text1.controlsource = dummy.description <-- This line causes the error
>
>If I comment out this line the form .scx runs normally.
>
>The following code causes another error when I attempt to use a class with a DE containing cursor1 and the initial selected alias set to cursor1.
>
>SET CLASSLIB TO vdolib.vcx ADDITIVE
>oPlayForm = CREATEOBJECT('test')
>oPlayForm.dataenvironment.addobject("cursor2","cursor") <-- Causes unknown member error ie: there is no DE contained in this instance
>
>BTW - This error is the same with nothing in the data environment prior to saving as class
>
>I guess I don't understand this error. If I create a form visually with a DE and control sources set(like the wizard), why does it complain it is an unknown member when this form is saved as a class, then created using CREATEOBJECT()? Is this not essentially the same object whether run as .scx or an object created in runtime code? Do I need to oPlayForm.addobject("dataenvironment", "dataenvironment")? I attempted this and got a message saying the object type is invalid for the container. Does this mean the form that was saved as a class does not qualify to contain a DE?
>
>The score is now, VFP - 1
> ERIC - 0
>
>Eric K.
Ned

Reality is.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform