General information
Title:
Sub classing a prg based class gives project error
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only