Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with Dataenvironment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00691805
Message ID:
00693544
Vues:
17
well, i don't create programmatically Forms or dataenvironment so i cannot send u that kind of code. Anyway it usually works fine but sometimes it happens that when I runa a form, it gives me strange errors such us Alias not found , and when i open the dataenvironment code i find that what i wrote in the open tables is stored in the close table and viceversa.
About the nodefault followed by dodefault(), i use that because it ensure that VFP process the default method before processing the code i put after.
thank u again
Alessio

>I was hoping to see code like the following:
>
>
>

>LOCAL oDE
>oDE = CREATEOBJECT('custom_de')
>set
>WAIT WINDOW "DataEnviroment has been created"
>BROWSE
>
>DEFINE CLASS custom_de as dataenvironment
> AutoOpenTables = .T.
> AutoCloseTables = .T.
> ADD OBJECT oCustomer as csrCustomer
>
> PROCEDURE Init
> IF This.AutoOpenTables
> WAIT WINDOW "OpenTables() is about to be called"
> This.OpenTables()
> ENDIF
> ENDPROC
>
> PROCEDURE Destroy
> IF this.AutoCloseTables
> WAIT WINDOW "CloseTables() is about to be called"
> This.CloseTables()
> ENDIF
> ENDPROC
>
> PROCEDURE OpenTables
> WAIT WINDOW "Currently executing the OpenTables() method"
> ENDPROC
>
> PROCEDURE CloseTables
> WAIT WINDOW "Currently executing the CloseTables() method"
> ENDPROC
>ENDDEFINE
>
>DEFINE CLASS csrCustomer as Cursor
> Alias = "Customer"
> CursorSource = "Customer"
> Database = HOME(2) + "Data\TestData.dbc"
>ENDDEFINE
>

>
>In either case, is this similar to what you have? I don't understand why you have NODEFAULT then immediately followed by DODEFAULT() clauses in your code. Can you show more of your code. Maybe that'll help understand why your code doesn't work. By the way, the code above work just fine in my environment.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform