Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO Classes
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00577440
Message ID:
00578009
Vues:
25
Hi Larry..

Now I see where implements fits... I have not looked at this since early on. At one time, I thought it worked the same way as VFPCOM did.

Thanks for the clarification...

But you know what, I don't like this behavior - because you have to implement a whole bunch of other things. I know one should implement an entire, not just part of an interface. THe nice thing about VFPCOM is that it was like WITH EVENTS in VB. There are times when all you care about is the events. I see event binding and interface implementation as two different things - that have been munged together...

I tried to get this to work - dragging and dropping the interface to a code editing window. That worked, but I could never get the class to instantiate.

I am not sure I call this progress....< s >...

Having seen this, I think VFPCOM and only surfacing up the events in your class is by far, a more efficient way to go since it is more akin to With Events.

Call me simple, but I see code like this as being much simpler:
Set Step On 
Local oComUtil as vfpcom.comutil
Local ors as adodb.recordset
Local oconn as adodb.connection

oComutil = createobject("vfpcom.comutil")
oEventSink = CreateObject('PKTest')
oConn = CreateObject('ADODB.Connection')
ocomutil.BindEvents(oconn,oeventsink)

oRs = CreateObject('ADODB.RecordSet')
oConn.Open('pubs')
oRs.Open('Select * From authors',oConn)

Define Class pktest as Session
   Procedure willconnect(a,b,c,d,e,f)
      MessageBox("Connecting!")
   EndProc
EndDefine
On one hand, you have to instantiate VFPCOM. On the other hand, you don't need to lug around the extra bagage that IMPLEMENTS/EVentHandler requires...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform