Dragan,
>Opened in class browser and took a look at the source code, copied it into a .prg and found no way to run it.
The class browser does not generate runable code, especially if there is more that one level of containership invloved.
You have to write an add-in that took each object and generated it's DEFINE CLASS (like what you did at the end) and convert the ADD OBJECT lines to use the defined class.
>It was something like this:
>
>Define Class someclass as formsetclass
>
> add object form1 as form
> add object form1.control1 as textbox
>
> procedure control1.click
> wait "you clicked, sir?" window nowait
> endproc
>enddefine
>
>It showed " procedure control1.click" as if belonged to formset, and not to formset.form1. It compiled anyway, but refused to run, stating that object reference is wrong. So I changed it to procedure form1.control1.click", but wasn't any better. Tried a couple of other things, but none worked.
>
>Does anyone know a way around this, or the thing is simply impossible. The only solution I've found so far is like this:
>
>
>Define Class someclass as formsetclass
>
> add object form1 as form
> add object form1.control1 as MYtextbox
>EndDefine
>
>Define Class mytextbox as textbox
> procedure click
> wait "you clicked, sir?" window nowait
> endproc
>enddefine
>
>...but it seems like an overkill, having to subclass every control which needs some method code.