Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put Implements?
Message
 
 
À
22/01/2004 03:17:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00868196
Message ID:
00869418
Vues:
20
>>I mean using a non-visual class which implements the SOAP Toolkit interface. Then, in your visual code, you do something like:
>>
>>
>>this.oSoap = NewObject( "MichelSoap", "MichelSoap.prg" )
>>BindEvent( this.oSoap, "YourHook", this, "CustomDelegateMethod" )
>>
>>
>>where CustomDelegateMethod it is a method you added to your form that acts as a delegate for the object YourHook event.
>
>What does the this, as the 3rd parameter, means?

You should read it as: Bind the event YourHook from the object this.oSoap, to the method CustomDelegateMethod of the object this (in this context, your form).

Try this to understand BindEvent. Create a blank form and put just:
* Form Init
BindEvent( _Screen, "Resize", this, "MyDelegate" )

* Create a MyDelegate custom method and write this code in in:
this.Caption = transform( _Screen.Width ) +" x "+ transform( _Screen.Height )
Now run the form and resize the VFP desktop to different sizes. Your form will trap the event and reflect it in its caption.

Hope this helps,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform