>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 :)