Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic Accounting source code for educational purposes
Message
From
09/12/2004 16:00:27
 
 
To
09/12/2004 14:17:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00967833
Message ID:
00968125
Views:
10
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform