Hi all,
Sorry I haven't been around much and checking in here. There are several issues being discussed so I'll make a couple posts to clarify what I can. I'll start with this:
RemiHiyama wrote: ↑Tue May 21, 2019 3:48 pm
Is this supposed to work in GuideMe 3.8? When I try opening any of the examples in the 1.53 package in that GM version, it pops up two blank javascript error windows and then just sits on "Something went wrong".
No, but yes. Guideme 3.6 (and higher) changed the way javascript files are loaded. In older versions of Guideme the contents of the javascript file had to be wrapped in a <globaljavascript> and "CDATA" tag like this:
Code: Select all
<GlobalJavascript>
<![CDATA[
function myFunction() (
// contents of function
}
]]>
</GlobalJavascript>
Note the first two lines, and the last two lines.
Starting with Guideme 3.6 this is no longer required and you have to remove those lines to get the javascript to load properly. So the example above would just look like this:
Code: Select all
function myFunction() (
// contents of function
}
You can edit the ScriptEngine.js file and remove those lines, and then it should work. If you are using any of the other javascript files included in the script engine package you will need to edit those as well. I've been trying to get an updated package released but life is not cooperating.
mantrid wrote: ↑Sun May 19, 2019 10:14 pm
Just a small small cross posting.
Today I lost a few hours to the GuideMe state data bug. Unfortunately the workarounds stated
here did not help. The problem for me was that the functions defined in 'ScriptEngine.js' couldn't be found, including 'ExitAllScripts()' and 'loadScript(...)'.
The workaround (for me) is to insert 'ScriptEngine.js' directly. Thats not wired enough: If I now overwrite the state file of the old version (with the 'include' statement) with the state file of the new version, the old version now works to.
The full report can be found in the
GuideMe thread.
Mantrid, see the above in response to RemiHiyama. This is why the javascript functions were not being found, and why inserting the contents of the ScriptEngine.js file directly in the xml file fixed it.
This is completely different from, and separate from the state data bug.
I have no explanation for how overwriting the state file of the old version with the state file of the new version would cause the old version to work. The old version will never "include" the ScriptEngine.js file until that file is updated as described above. Unless Guideme is somehow saving the ScriptEngine code in the new state file. Don't know about that.
I'll try and review the other posts here and see if I can add anything, and try to clarify what the state file bug is more clearly. At the moment I only have about half an hour and then I have to go to work, so it may be tomorrow before I can post more comments.
PG