Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
In lieu of SESSION object for use in VFP6 based objects
Message
De
11/04/2004 13:40:36
 
 
À
10/04/2004 15:49:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00893854
Message ID:
00893922
Vues:
16

.....

1. create a session class based on container
2. the same class would have a form (Visual FoxPro base class) added to it during init or load
3. this form should have a private data session
4. once the form is instantiated, its datasessionid could be retrieved and saved into a propery of the session object
5. the form could now be released in memory
6. the business object can then use the datasessionid used by the form


will this work? just looking at it this way makes me feel that this is too much memory and resources consumed just to get that datasessionid....


On VFP6 you can use a session object for build a private datasessionid, and bind it to a object.
public y
y =createobject("myContainer")
Y.Click
* now when VFP exec code on y, the datasession is private
*RELEASE y  && this release the y container, and then release the private datasession

DEFINE CLASS myContainer AS container
  
  	PROCEDURE Init
		WITH CREATEOBJECT('Session')			&& this build the datasession
			SET DATASESSION TO .DatasessionId	&& this bind the datasession
		ENDWITH						&& datasession costructor can to be releases
  	ENDPROC

	PROCEDURE Click
		CREATE CURSOR privateCursor ( aa i)
		? SET("Datasession"),ALIAS() 	
	ENDPROC
ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform