Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object not available in subclasses
Message
 
 
To
23/08/2007 09:50:25
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01249841
Message ID:
01249845
Views:
17
This message has been marked as the solution to the initial question of the thread.
You forgot to call DODEFAULT() as the first line in the Init of the subclass.

>For some reason my subclasses do not have an oSock object available in them. I can't see how I get an oSock object create in the main EMPS_Class either. Ok, I do see that in the INIT. Do I need to do that for the subclasses too? I thought the INIT code from the main class would run before the subclass INIT did?
>
>
>
>DEFINE CLASS EMPS_Server_Class AS EMPS_Class
>
>	**********************************************************
>	PROCEDURE INIT
              * Should be DODEFAULT()
>		oSock.LocalHostName = m.HostName
>		oSock.LocalPort = m.Port
>		oSock.Listen()
>		* oSock.SendData("This is a test.")
>
>	ENDPROC
>
>ENDDEFINE
>
>
>
>**********************************************************
>DEFINE CLASS EMPS_Client_Class AS EMPS_Class
>
>	**********************************************************
>	PROCEDURE INIT
            * Should be DODEFAULT()
>		oSock.RemoteHostName = m.HostName
>		oSock.RemotePort = m.Port
>		oSock.Connect()
>		* oSock.SendData("This is a test.")
>
>	ENDPROC
>
>ENDDEFINE
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform