Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding code to methods programatically?
Message
From
07/10/2004 19:18:27
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00949721
Message ID:
00949747
Views:
11
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é
Previous
Reply
Map
View

Click here to load this message in the networking platform