Web Connection 5.0
Re: Problem with RenderAspScript
07/01/2009
05:52:30 AM
2OT0CLDJV Show this entire thread in new window
From:
Jim Day
To:
Michel giustina
Attachments:
None
See below from help file: lcTemplate must be a file on disk you are passing a character string instead.

o.RenderAspScript(lcTemplate)
Return Value
Evaluated result from the script code.

Parameters
lcTemplate
Name of the file on disk to parse


Hi Rick,

Thank you for your reply

I agree with you, but I just a bug if I made a mistake.
In this case I do not have the normal message displayed on my page but an error VFP.

Excuse my bad English.

Regards

Michel

Uh the variable you're referencing is invalid?

This works for me:

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

this also assumes the lcGood is declared local (PRIVATE or PUBLIC will work)

+++ Rick ---

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,