Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding code programmatically
Message
De
12/10/2004 12:05:50
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00950358
Message ID:
00950708
Vues:
12
Is what I did Mark and it is what I want to do. The only thing is that I cannot use the execscript because in this case i cannot refer to object calling them by their Hierarky (i.e thisform) so i run the code by the "&"

I wrote the line command in a table and let the sub classed object read and execute the code stored in that table.
I don't know if it's the best way to do that , but till now it satisfies me :-)
Thank you very much MArk

>You will not be able to write code to a method at runtime. This is why I suggested you store code where you want then use EXECSCRIPT() to run that code. You just need to put the EXECSCRIPT() in the method you want. When you add the object programmatically to a form at runtime, this object should be sub-class of your own making (e.g., MyTextBox, MyCheckBox) that has the EXECSCRIPT() code in the methods you are interested in.
>
>>Thank You Mark,
>>But my problem is where to write the execscript() command.
>>Actually i have a grid class which shows me a list of records.
>>Till Yesterday I need to exeute something in it's afterrowcolChange event,
>>and something in the click event of a checkbox i programmatically add to the grid. To do that I create a checkbox object in which I impose it's click event to check a variable containing some code and then if it was not empty process it. The I fill this Property when I add the object programmatically.
>>Today I want to process something in the doubleclick event of a textbox.
>>What I wantto avoid was to create a specific class of tetbox, if I only could fill the doubleClick event with some code !!!!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform