>>I think this won't work, but I want to have a method in my form that calls a method and in that method classes are defined... or something like that. Can I mix forms with text-based classes? Do I have to put them into the Main program that calls the form? Thanks!
>
>I don't know what you are trying to accomplish, but in any case this is what I'd do if I wanted to create a class definition in a form method (or any other class method):
>
>TEXT TO lcClassDef TEXTMERGE NOSHOW
>*-- Just an example of a form class:
>DEFINE CLASS MyFormClass AS Form
> Backcolor = 0
> LEFT = 0
> TOP = 0
>ENDDEFINE
>
>ENDTEXT
>*
>THISFORM.cClassDefinition = FORCEPATH(FORCEEXT(SYS(2015),"PRG"),GETENV("TEMP"))
>*
>STRTOFILE(lcClassDef,THISFORM.cClassDefinition,0)
>COMPILE (THISFORM.cClassDefinition)
>*
>*-- In another method in your form call first the code above in a method and then instantiate your class that way:
>loForm = NEWOBJECT("MyFormClass",THISFORM.cClassDefinition)
>loForm.SHOW(1)
>
>
>HTH
Christian,
Your code looks pretty interesting. It appears you can get around not being able to define a class in a form method this way. Fox code is so flexible.