Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BINDEVENT() (and related) - best placement of code?
Message
De
25/04/2003 13:59:36
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
 
À
25/04/2003 13:44:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00781200
Message ID:
00781608
Vues:
15
Hi Paul,

>
>If you use the default for nFlags, then RaiseEvent only has a few uses.
>Like working around the bugs/features in VFP :)
>
>For example, I wanted to handle forms when they are created.
>I don't have a form manager class, but I didn't think I needed one.
>Just BINDEVENT(_screen,"formcount",this,"test") ought to fire my test() method each time a form is instantiated.
>Bad news ... it doesn't work.
>What you have to do is add in the INIT() of each form RAISEEVENT(_screen,"formcount") and it miraculously triggers my method.
>
>This seems to apply to many PROPERTIES where I want to trigger my delegate from a change to a property rather than from a method call.
>
>Methods or Events weem to work OK, so far.

Thanks for the tip. I'm sure knowing that ahead of time will save me some frustration.
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform