Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: #INCLUDE file with relative path
Message
From
17/10/2005 18:00:39
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: #INCLUDE file with relative path
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01059768
Message ID:
01059768
Views:
53
Expected:
If is defined in a file.h a
#include ..\relativepath\file1.h
directive with a relative path,
VFP it has to use that file, if it doesn't exist it has to produce an error.

Observed:
VFP looks within the folder of the file.h if a file "file1.h" exixts,
if it finds it then uses it, ignoring the "..\relativepath"

Repro:
* TESTBUG structure files
*   progtest.prg
*   myClasslib.vcx (myClass)
*   INCLUDEPATH1
*	incfile1.h
*   INCLUDEPATH2
*	incfile1.h	the bug file !
*	incfile2.h should to use ..\INCLUDEPATH1\incfile1.h


CD TESTBUG
MD INCLUDEPATH1
MD INCLUDEPATH2
SET TEXTMERGE NOSHOW OFF

SET TEXTMERGE TO INCLUDEPATH1\incfile1.h
\#DEFINE constant1	"I'm the correct constant"

SET TEXTMERGE TO INCLUDEPATH2\incfile1.h
\#DEFINE constant1	"I'm the bug"

SET TEXTMERGE TO INCLUDEPATH2\incfile2.h
\#INCLUDE ..\INCLUDEPATH1\incfile1.h
\#DEFINE constant2	constant1

SET TEXTMERGE TO progtest.prg 
\#INCLUDE INCLUDEPATH2\incfile2.h
\? constant2
SET TEXTMERGE TO

CREATE CLASSLIB myClasslib.vcx

save_INCLUDE = _INCLUDE
_INCLUDE = "INCLUDEPATH2\incfile2.h"
CREATE CLASS myClass OF myClasslib.vcx AS CUSTOM NOWAIT
_INCLUDE = m.save_INCLUDE 

ASELOBJ(acd,1)
SET TEXTMERGE TO MEMVAR initcode
\? constant2
SET TEXTMERGE TO

acd[1].WriteMethod("Init",initcode)

KEYBOARD '{CTRL+W}' PLAIN CLEAR
DOEVENTS

* START TEST
CLEAR
? "program"
DO progtest.prg
? "vcx class"
=NEWOBJECT("myClass","myClasslib.vcx")
CLEAR CLASSLIB myClasslib
CLEAR ALL

ERASE INCLUDEPATH2\*.*
ERASE INCLUDEPATH1\*.*
ERASE *.*
RD INCLUDEPATH1
RD INCLUDEPATH2

CD ..
RD TESTBUG
Reply
Map
View

Click here to load this message in the networking platform