Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class/Subclass problem
Message
 
À
26/09/2007 20:30:24
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:
01257063
Message ID:
01257071
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Jay,

Your DataArrival method must be prefaced with DMSWinsockControlEvents_ in order to be the one that runs.

>Updated...
>
>I have a class: DEFINE CLASS EMPS_Class AS SESSION OLEPUBLIC
>
>With this: IMPLEMENTS DMSWinsockControlEvents IN "c:\windows\system32\mswinsck.ocx"
>
>Then I have a subclass: DEFINE CLASS EMPS_Server_Class AS EMPS_Class
>
>The EMPS_Class has this proc: PROCEDURE DMSWinsockControlEvents_DataArrival(bytesTotal AS NUMBER) AS VOID
>
> (no code in this procedure)
>
>The EMPS_Server_Class has this proc: PROCEDURE DataArrival(bytesTotal AS NUMBER) AS VOID
>
> (there is code in this procedure)
>
>When I run this: oxServer = CREATEOBJECT( "EMPS_Server_Class",m.Port )
>
>Everything works well, except when data comes in, the DataArrival code that runs is from the EMPS_Class, not the EMPS_Server_Class as I expected. I have a DoDefault() in the subclass, but shouldn't the subclass procedure code run after that?
>
>I know this is scarse code, but the entire class is a bit big to post here. If someone wants to look at the whole thing, I'll gladly send it to them. Proprietary code be damned!
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform