pascalscript - How to check if an object is NULL in Inno Setup Pascal Script? -
I am writing a Pascal function using these setup studios which is an object blank and does something
< P> I still have: XMLDocument.setProperty ('select language', 'XPath'); XMLNode: = XMLDocument.selectSingleNode (AEP); If (XMLNode = null) starts then // do stout and end // other stuff but I keep getting the invalid version operation error.
How do I check whether the object is empty in the Inno Setup Pascal script code?
if any variant is null Use:
If VarIsNull (XMLNode) then However, in your case, the problem is a bit more complicated. The method always gives a type of type whose real data pointer is not a node found in the case of an XML dome node, or zero . In Delphi (the language in which the INA setup Pascal script has been written) is such a ceremony that includes such a situation. Unfortunately, this is not published in the setup. You can however, test this matter with a statement like this. :
If (IDPatch (XMLNode) = zero) then this data will be returned from the variant and for zero They test the data.
Martijn Laan added the VarIsClear function to the Unicode version of the INO setup, so INO Setup 5.5.6 will give you the VarIsClear instead of the above hack Can be used.
Comments
Post a Comment