Just to make sure there is no buggy XML/PowerPac behavior, I created this XML file:
<?xml version="1.0" encoding="utf-8"?>
<page>
<config delay="">
<!--Nothing to configure.-->
</config>
<limits>
<text>
Waiting for text to change ...
</text>
<function name="myTrigger" event="trigger" params="" useTB="true">
<![CDATA[
tbfunction_pgTBObjSet(this.name, 'text', 'Hello, how are you?');
]]>
</function>
</limits>
<!--Additional <config#> ... </config#> sections as required.-->
<config2 delay="350">
<exeJavascriptDirect>
<![CDATA[
/* Trigger <limits> after 5000ms
Result will be that the text will change in the field.
***/
tbfunction_pgTBObjSet('limits', 'trigger', '', 5000);
]]>
</exeJavascriptDirect>
</config2>
</page>
Then I created a 1 page ToolBook with a single field named "limits".
Exported the file and it worked perfectly!
So what "may" be the problem you are having?
- The error message your are receiving is generated by PowerPac's XML Engine and is telling you that when the PowerPac tried to compile "something" in your XML file, it encountered the missing syntax error. These errors are pretty accurate. If a closing parenthesis is missing, it probably is. BUT, it may not be related to the function your looking at. XML files are processed from top to bottom, so the error likely occurs before the trigger function definition.
- To troubleshoot this, progressively comment out sections of your XML file until you find where the missing syntax is located. Fortunately, this is easy to do with a single export because all you have to do is edit the XML file and then refresh the browser.