Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Single COMMON class that exists in 10 classes
Message
From
17/02/2009 12:33:48
 
 
To
17/02/2009 11:53:15
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Miscellaneous
Thread ID:
01382376
Message ID:
01382414
Views:
64
Hi Greg

Thank for the code.

I guess I should ask my question in it is exact situation.

I am building my frame, in which i am trying to use something like
Numbers = CreateObject("Numbers")
Numbers.Convert.HexToDec("FFF")
SQL  = CreateObject("MSSQL")
SQL.SQL2000.Server="Myserver"
SQL.SQL2005.Connection.Authenticate = "Local"
The only problem with your code above, since I have to many classes saved in separate prgs, and depends on your code
which I already tried, imagine this.
** Frame_Initialize.prg
&& create all the classes and add class to each other 

** common.prg
Public oCommon && <-- Should I public this variable?
oCommon = CreateObject("Common")
Define Class common as Session OLEPublic
    **** PEMs
Enddefine

** class1.prg
Define Class Class_1 as Session OLEPublic
    **** PEMs
    Procedure Init
    AddProperty(oCommon,"common")
    Endpr
Enddefine

** class2.prg
Define Class Class_2 as Session OLEPublic
    **** PEMs
    Procedure Init
    AddProperty(oCommon,"common")
    Endpr
Enddefine

** class3.prg
Define Class Class_3 as Session OLEPublic
    **** PEMs
    Procedure Init
    AddProperty(oCommon,"common")
    Endpr
Enddefine
I know I can get the Variable that create class variable by AInstance() But I could figure out YET how to use it in my case.

TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform