Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object not available in subclasses
Message
 
 
À
23/08/2007 09:50:25
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01249841
Message ID:
01249845
Vues:
18
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform