2
Vote

Error in Controller/Restful demo

description

If the installation directory is more than 1 directory deep then the CustomerController (customer.prg) demo program and the Include function in AVFPutilities.prg will not be able to find procedures and views.

The erroneous lines in the Listaction method of Customer.prg use the following to Set Procedure to:

substr(oProp.AppStartPath,1,AT([],oProp.AppStartPath,2))+

and the fix is this:

SET PROC to oProp.appStartPath+'prg'+'\AVFPutilities' ADDITIVE

For Views, the erroneous code does this:

substr(oProp.AppStartPath,1,AT([],oProp.AppStartPath,2))+

and the fix is this:

cHTML= oHTML.mergescript(FILETOSTR(oProp.appStartPath +'viewtest.avfp'))

In the Include function in AVFPutilities, the line should read like this:

lcHTMLout= FILETOSTR(oProp.appStartPath +lcHTMLfile) &&fixed path

comments