Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActiveX Events in PRG vs SCX?
Message
De
02/04/2001 18:47:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00491099
Message ID:
00491124
Vues:
9
>I created a dummy form, dropped a PowerTCP web server control on top of it, and put this code into the GET Event:
>
>
>*** ActiveX Control Event ***
>LPARAMETERS session, request, response
>ThisForm.Label1.Caption = request.filename
>
>
>And when the event fires, the caption updates. I guess this means that the parameter "request" is an object itself, right?
>
>But wait, there's more I don't understand. :)
>If I do the following in a .prg, I get an OLE error "OLE Error 0x80020006: Unknown Name" on the line that is oW.Get()
>
>oW = CreateObject("Dart.Webserver.1")
>oW.RootDirectory = "c:\"
>oW.LogDirectory = "c:\"
>oW.Start(8080 , -1 , "127.0.0.1" , "127.0.0.1"  )
>tStartTime = DateTime()
>Do While .T.
>  oW.Get()
>  DoEvents
>If DateTime() > (tStartTime + 15)
>Cancel
>EndIf
>EndDo
>oW.Stop
>oW = .Null.
>
>
>I guess there is more than one way to reference a control's event, but I'm not understanding. I also tried to adapt Erik's Moore's "ActiveX Decorator Discovery" code, creating my own GET() that could be called but I get the error "request is not an object".
>
>Anyone?

If Get is an event, I don't think it's necessarily true that it's also a method that you can call. (As evidenced by your inability to call it with oW.Get()). I have no idea what the PowerTCP control is, but does it say that Get is a callable method?

And if this is a control that is meant to be used from/with ASP, then yes, Request, Response and Session are most likely objects...
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform