Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Basic Accounting source code for educational purposes
Message
 
 
À
09/12/2004 14:17:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00967833
Message ID:
00968125
Vues:
19
Hi Shafid...

You can use the properties members of object wich can be...
a) Attached to the top level object of VFP: _screen
b) Using this object as an public object, so you will have only one public "variable", but it is an object. In most frameworks it is called MainAppObject, if you still have VFP6 you will see it at Tastrade Project.

Samples:
****A)  Attached to Screen ***
_SCreen.AddObject("oApp","cApp")
**** Using like this ****
lcUserName = _screen.oApp.cUserName
lnPrivelegeLeve = _screen.oApp.nPrivilegeLevel

****B) As a Public Object *****
PUBLIC oAPP 
oAPP = CREATEOBECT("cApp")
**** Using like this...
lcUserName = oApp.cUserName
lnPrivelegeLeve = oApp.nPrivilegeLevel

**** In any case...

IF lnPrivilegeLevel > 0 
  ** .....
ENDIF

**** In any case, you should have a class definition with all the PEMs 
**** as you need.

DEFINE CLASS cAPP as Session
   cUserName
   cPrivilegesLevel
   PROCEDURE INIT
      ****
   ENDPROC
ENDDEFINE
HTH
>Thanks John. "Object properties" instead of Public variables, what do you mean ???
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform