Web Connection 5.0
Re: Problem with RenderAspScript
07/01/2009
06:05:09 AM
2OT0D1MS4 Show this entire thread in new window
From:
Richard Norris
To:
Michel giustina
Attachments:
None
Hi Michel,

Are you saying that, if an error exists in the script file, the function handles the error and displays the output to the browser. For string literals it does not behave the same it causes VFP to error? I agree this could be seen as a potential bug with the framework, although armed with this knowledge you should be able to trap the error with a TRY/CATCH block. Am I on the right lines here?

Regards

Richard

Hi Richard

Quite
If you run this code you do not have the same result.

* a file Template_File.htm in c:\temp * [Exemple<br><!--%=lcNotGood%-->] m.lcGood = [This is a goog name for my Variables] m.lcPage = RenderAspScript( [c:\temp\template_file.htm], 1)

Regards

Hi Michel,

I'm not sure what the extra code your showing me represents? If the code has syntax errors the VFP application is going to error. I'm not sure what your trying to say here? Are you saying you want to trap the error and display it to the user in the browser?

Regards

Richard

Hi Richard
Thank you for your reply
I have the following error

Invalid path or file name

in line 286 of wwscriptiing.prg

*** Figure out our filenames to use lcFileName = JUSTFNAME(this.cCurrentTemplate)


Hi Michel,

The small sample provided indicates an error would occur as you say; where is lcNotGood defined? Although you do not need to define a variable explicitly this script will probably not automatically convert the logical variable lcNotGood to string as the output requires. I assume the error your reciving is "Operator / Operand type mismatch" or something along those lines, but I do not know this as you have not told us what the error is??

Regards

Richard

Hello,

I think I found a small bug with this exemple.

m.lcGood = [This is a goog name for my Variables] m.lcTemplate = [Exemple<br><!--%=lcNotGood%-->] m.lcPage = RenderAspScript( m.lcTemplate, 3, .T.)

I get an error.

What do you think,