>Trying to Instantiate a Visual Class sub-classed from a class created in a prg using define class gives me an error "Cannot find XXXClass in XXX.vcx".
>
>The only way I've found that I can modify the Visual Class is by creating the object in the prg class using createobject("XXXClass").
>
>I figured that if I use "Set Proc to XXX.prg" this would be enough for the Visual Class to find it's parent. But it's not working!!!
>
>Hacking the VCX file and changing the VCX reference to a PRG file the gives me an error "Not a table".
There's an utility, written by Tom Rettig, which creates a .vcx from a .prg which contains class definitions, and it works most of the time, with several limitations:
- the classes referencing parent classes defined outside the given .prg will be stranded, you'll have to hack the new .vcx to put proper information into classloc memo
- members of container classes should also be from the same .prg, or else you have the same problem to solve.
IOW, the thing is usable, but not perfect. I don't know where I found it when I needed it, the filename is true.zip, and I couldn't find it here.
Still, you can't base a visual class on a .prg based class. It does work the other way, though, you can have
Define Class Blabla as MyForm of myforms.vcx
and it will work, though it will not invoke intellisense for any object declared to be Local oWhatever as Blabla of MyPrgClass.prg.