Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to prevent datasession switching on global object ca
Message
De
11/07/2005 09:07:03
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
 
À
11/07/2005 08:44:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Divers
Thread ID:
01031168
Message ID:
01031179
Vues:
15
Hi
I usually create an instance of that object and store the reference in form property

Then you have to call :
thisform.oG_server.Method()
and it uses form data environment


>I created global object g_server in default data session based on custom class.
>
>I call this object methods from prg files.
>I want that methods are executed in the caller datasession.
>However, FoxPro switches datasession to the session where g_server is created on call.
>
>I cannot pass datasession id as parameter since it is difficult to determine the datasession id (prg nesting is deep, this requires major re-write).
>
>Using
>
>SET DATASESSION TO (thisform.DataSessionId)
>
>causes error object is not contianed in form
>
>Using
>
>SET DATASESSION TO (_screen.activeform.DataSessionId)
>
>causes sometimes error _screen.activeform is not an object
>
>
>How to disable datasession switching when calling global object method ?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform