Discussion:
'Expression evaluator failed' - is this an msxml4.dll or FoxPro problem ?
(too old to reply)
flupp
2004-04-30 09:31:31 UTC
Permalink
Hello All,

When calling the code from a class' procedure, I have the error 'Expression
evaluator failed' on the marked line. The help mentions that I should
recompile the program. I did recompile the FoxPro program, but I have more
the impression that the help means to recompile the dll that I'm using ...
but that dll is Microsoft's own msxml4.dll. So is this a FoxPro problem, or
a(n un)known msxml4.dll- problem ? Or maybe a syntax error (I don't think
so, though). And (more important to me) HOW can I solve it or work around it
?

Kind regards,

flupp

THIS.XMLNode.xml reads (_literally copied_ from the source file, and it also
reflects the same value while debugging in FoxPro 8.0):

<OutputString>
<Name>NameBaler</Name>
<Width>124</Width>
<Height>16</Height>

<BackgroundColour>silver</BackgroundColour><FontAttributeReference>16pFont</
FontAttributeReference><StringVariableReference>StrNHBaler1</StringVariableR
eference><HorizontalJustification>middle</HorizontalJustification></OutputSt
ring>

More readably it reads:
<OutputString>
<Name>NameBaler</Name>
<Width>124</Width>
<Height>16</Height>
<BackgroundColour>silver</BackgroundColour>
<FontAttributeReference>16pFont</FontAttributeReference>
<StringVariableReference>StrNHBaler1</StringVariableReference>
<HorizontalJustification>middle</HorizontalJustification>
</OutputString>

Then I have the following procedure code :

PROCEDURE DoSpecialConversions

LOCAL underDOMNode AS MSXML2.IXMLDOMNode

-> FOR EACH underDOMNode IN
THIS.XMLNode.selectNodes("HorizontalJustification")

...

ENDFOR
ENDFOR

ENDPROC
Sietse Wijnker
2004-05-03 13:00:38 UTC
Permalink
Hi there Flup,

I've tested this with the same result as you did: 'Expression evaluator
failed'
My guess is that the MSXML's timing in relation to the FOR EACH...NEXT loop
isn't correct

When you use the following code the problem doesn't occur!

PROCEDURE DoSpecialConversions

LOCAL underDOMNode AS MSXML2.IXMLDOMNode
LOCAL DomNodeList AS MSXML2.IXMLDOMNodeList
DomNodeList = THIS.XMLNode.selectNodes("HorizontalJustification")
FOR EACH underDOMNode IN DomNodeList
*code here
ENDFOR
ENDPROC

HTH,
Sietse Wijnker
flupp
2004-05-04 11:23:09 UTC
Permalink
Sietse,

Thanks for trying this out. I'm "glad" (kind of) that it didn't only apply
to me. I think then, that this could very well be a FoxPro bug, as it is
valid FoxPro syntax what I initially wrote down.

Kind regards, or as we could say in our mothertongue ...
Vriendelijk bedankt,

flupp
Post by Sietse Wijnker
Hi there Flup,
I've tested this with the same result as you did: 'Expression evaluator
failed'
My guess is that the MSXML's timing in relation to the FOR EACH...NEXT loop
isn't correct
When you use the following code the problem doesn't occur!
PROCEDURE DoSpecialConversions
LOCAL underDOMNode AS MSXML2.IXMLDOMNode
LOCAL DomNodeList AS MSXML2.IXMLDOMNodeList
DomNodeList = THIS.XMLNode.selectNodes("HorizontalJustification")
FOR EACH underDOMNode IN DomNodeList
*code here
ENDFOR
ENDPROC
HTH,
Sietse Wijnker
Loading...