Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding public object and Data Session
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01319198
Message ID:
01319210
Vues:
19
>>Good morning,
>>
>>Say you have an object (based on CUSTOM class) declared PUBLIC but instantiated in a form with Private Data Session. Does it mean that the methods of this object will be always be using Private Data Session? That is, tables open or cursors created in a method of this object are not available outside of the object/method?
>
>Here is the catch - when you create an object, unless it's a session based class it always shares the DS of the calling process.
>
>I do remember I was hit by this pretty badly once and only with Dragan's help was able to figure out the root of my problems.

So you are saying that if the base of the class was SESSION I wouldn't have to worry about calling methods of this class/object from any procedure (even private DS form)?

UPDATE. Even after changing the base class from CUSTOM to SESSION, the methods of the class seem to be working in private DS.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform