PDA

View Full Version : VCO vs VCP?



andrew@aksel.com
2013-09-27, 05:21
A few things in working with VCP files.

1. What is a VCO file? When I get an error doing SET CLASSLIB TO common.vcp , It refers to common.vco. I imagine this is the compiled version - but if so, shouldn't Lianja still refer back to the VCP file?

2. It would appear that classes defined in a VCP file can't refer to itself.
By that I mean, I can't have this in the same feil.


DEFINE CLASS lstStandard as Listbox

ENDDEFINE

DEFINE CLASS lstSpecial As lstStandard

ENDDEFINE

I have to separate them into separate files. Is that correct?

lianjasupport
2013-09-27, 06:54
Hi Andrew,

All files are just-in-time compiled. A VCP is compiled into a VCO. A SCP into an SCO and a PRG into a DBO.

There should be no problem subclassing classes that exist in the class library, in fact the SCX and VCX importers generate classes like that.

the only gotcha is that Lianja does not handle forward class references so if you are sub-classing another class it must be defined above in the file.

andrew@aksel.com
2013-09-28, 04:05
Did you mean "above in the file"?

I had to re-arrange the layout of the VCP and it did work.
Thanks

Can I suggest a change in the import of VCX files then? When you import the VCX and create the VCP, order the definitions based on ParentClass so that the original class definitions come first.

lianjasupport
2013-09-28, 04:29
Hi Andrew,


yes typo sorry.


The importers are all on lianjax.com and are written in Lianja/VFP scripting, i thought they did that and will take a look.