Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sub classing a prg based class gives project error
Message
From
20/06/2002 13:39:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Sub classing a prg based class gives project error
Miscellaneous
Thread ID:
00670728
Message ID:
00670728
Views:
52
I want to sub-class a prg based class but find that I get an error from my project everytime I try to build it.
The error that I'm getting is:

'The name of the object file for c:\develop\libs\testchild.prg is already used by another program in the project.'

What it seems to be trying to do is to add the testchild.prg to the project again even though it already is in the project.

Here's how to trigger this behaviour.

In testparent.prg put:
DEFINE MyParent AS Session

ENDEFINE

In testchild.prg put:
DEFINE MyChild AS MyParent OF testparent.prg

ENDDEFINE

You should be able to put these in a project and build it with no errors.

Now, because I keep my global class definitions in a different place to my application specific ones, I need to change the app-specific testchild.prg in order to allow for a relative path between the two programs:

DEFINE MyChild AS MyParent OF libs\testparent.prg

ENDDEFINE

Build the app again and you will see the error. Can anyone confirm this behaviour ?

Is this a bug or should I not be using relative pathing ? I know I can workaround provided I use SET PATH and SET PROCEDURE commands but I thought the DEFINE CLASS's OF clause was meant to replace the need for these commands.

Richard
Next
Reply
Map
View

Click here to load this message in the networking platform