Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding code to methods programatically?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Adding code to methods programatically?
Divers
Thread ID:
00949721
Message ID:
00949721
Vues:
48
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform