Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add method programatically
Message
De
12/08/2001 10:56:13
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00488347
Message ID:
00542752
Vues:
19
>Hi, first, sorry for my english
>
>I'm working on methods, and I found this.
>
>If I use addproperty and then writemethod works!!!!!!!
>
>Example
>
>Close all windows, open command window and type this
>
>create class test of c:\test.vcx as custom
>_screen.forms(1).test.addproperty('mymethod')
>_screen.forms(1).test.writemethod('mymethod','* Comment')
>
>close the test window and reopen, the method is created
>
>I will use in a builder !!!
>
>VFP6 SP5

This is incredible - it really works! Not exactly each time, and it does require a save to get there, but it really works.

Man, I was trying to solve this one for four years, and this problem was actually the thing which brought me to UT - I came here looking for a solution for this problem.

The syntax may differ for a builder - I used this:
create class test of temp as form
=aselobj(aa,1)
aa[1].addproperty('newmethod')
aa[1].writemethod('newmethod', '* add code here')
And then it takes closing the editing window to get the property to become a method, but that's it.

This is a magnificent trick, and you're my software hero of the month :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform