Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding code to methods programatically?
Message
De
07/10/2004 19:18:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00949721
Message ID:
00949747
Vues:
12
Cool not only did you find a solution to your problem but you also showed us how to accumulate stars just by answering to threads that we started <vbg>

>Just realized that I can use BindEvent() to accomplish this. I created a new method of myTest and bound the Timer event of oTimer to my new method.
>
>>I tried doing the following:
>>
>>define class myTest as Custom
>>   protected oTimer
>>
>>   procedure Init
>>      this.oTimer = createobject("Timer")
>>      this.oTimer.Enabled = .T.
>>      this.oTimer.Interval = 800
>>   endproc
>>
>>   procedure oTimer_TIMER
>>      this.interval = 0
>>      = messagebox("This is a test")
>>   endproc
>>
>>enddefine
>>
>>
>>Apparently I'm doing something wrong because this doesn't work.
>>
>>I thought there was a way to programatically define the timer method without having to actually create a subclass of the timer. I know you can add code for _ASSIGN method of a class' property. Can you not define a method of an object property of a class?
>>
>>Thanks for your help.
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform