Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid event not fire
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00138190
Message ID:
00139264
Vues:
17
Brenda,

It's not defining a class on the fly, it is adding an instance (object) to the page at runtime. If you wanted that line object to have a click method you'd have to create a subclass of Line and put the code in it's Click() method. Then you'd just tell it to add an object based on your subclass:

create classlib YourClasslib
create class YourLineSubclass of YourClasslib as Line
add your click method

then in your code:

set classlib to YourClassLib additive
this.AddObject( "JustALine", "YourLineSubclass" )

>copied this from last week and it works great. have an additional question that may seem strange. i am a new vfp programmer and do not know how to do many simple things nor do i know the terminology. My questions is, you defined a class based on a line "on the fly". if i wanted to code something for ounderline.click, how would i do that. what is the syntax for adding method code to an object defined in code?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform