Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.prg Object Events?
Message
De
28/03/2001 17:18:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00489651
Message ID:
00489669
Vues:
8
Hi Steve,

You can only -- I guess populate is the right word -- events in the objects that match the events supported by that object. To do that, you just name the event by the event name and that code will run when it's supposed to. For example, if you have PROCEDURE Init in the code, whatever code you have there will run when the object is initialized.

You can't create events with custom names that will fire implicitly. You can create property_ACCESS and property_ASSIGN methods that will fire off when "property" is checked or changed...this may work for you.

Remember that different objects support different events, make sure you check the object's documentation for the events it supports.

>I have created an object in .prg code a lot, but I have only done properties and methods in code, no events. Can anyone point me to references or show some .prg code, etc on how to program events in code only?
>
>Thanks.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform