Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Visual Class from Prg base Classes
Message
From
22/12/2001 15:40:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00596920
Message ID:
00597773
Views:
17
>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform