I'm still struggling on with my overloaded program but less frequently these days. After a gap of several weeks I was surprised to see a number of problems which did not exist previously. Could the latest Powerpac update(s) be the cause? I'm not suggestimg you change anything because my excessive amounts of code are probably also to blame.
snapObjectToCenter
The code below in a JS file used to work but now it doesn't:
- Code: Select all
function tbfunction_showPad(progFolder, timeAllowed) {
tbfunction_pgTBObjSet("pad", "height", 362);
var barWidth = tbfunction_pgTBObjGet("bar", "width");
tbfunction_pgTBObjSet("textDisplay", "width", barWidth);
var isVisible = tbfunction_pgTBObjGet("teacherPad", "visible");
if (isVisible == false)
{
tbfunction_pgTBObjSet("pad", "visible", true);
tbfunction_pgGotoURL("pad", progFolder + "/video/CKE/pad/pad.html");
}
else
{
tbfunction_pgTBObjSet("menu", "visible", true);
tbfunction_pgTBObjSet("teacherPad", "text", "");
tbfunction_pgTBObjSet("pad", "visible", true);
}
tbfunction_snapObjectToCenter("container", "page");
tbfunction_pgTBObjSet("shield", "visible", true);
tbfunction_pgTBObjSet("container", "visible", true);
tbfunction_pgTBObjSet("myGroup", "visible", true);
timeAllowed = timeAllowed * 1
if (timeAllowed > 0)
{
var lapseS = tbfunction_pgDateFormat(timeAllowed, "isoTime");
lapseS = lapseS.substring(3, 8);
tbfunction_pgTBObjSet("writingCounter", "text", lapseS);
tbfunction_pgTimer(true, 1000, "writingCounter");
tbfunction_pgTBObjSet("timedWriting", "visible", true);
tbfunction_pgTimer(false, timeAllowed, "hideStart");
}
};
There are no messages. The code is simply not executed and the program stops.
I can cure it with this workaround:
- Code: Select all
tbfunction_pgTBObjSet("container", "left", 233);
tbfunction_pgTBObjSet("container", "top", 103);
By the way, correct me if I'm wrong but your help text seems to suggest that quotes are required around the dimensions in pixels. This doesn't work for me.

Another thing that used to work but now doesn't is pgGotoURL. The program (1 page) has a lot of things to load. It used to do the various loading procedures in this order:
XMLHttpRequest loads appropriate captions etc. in appropriate language from XML file
pgExtFiles loads a CSS file
pgGotoURL is then used 7 times to load various components 3 of which are TB DHTML files
The last file triggers an object in the main window which completes the loading process by loading a video file and using XMLHttpRequest to load an "instructions" txt file and another XML file is read which completes the final setting up of the page. The last item is almost certainly in the wrong place!
Despite the multiple tasks involved this used to load everything as planned although the TB files seemed to get loaded twice. I use an animated gif to indicate the loading time which works well however long the loading period is. You could probably advise me on the order in which I should do these tasks but why did it use to work but not now? The 3 TB files seem to get loaded because the trigger is sent from the last one. However when I make their containing fields visible all 3 are empty!?
To test that pgGotoURL is not hapenning or maybe happening and then getting cancelled I can make everything work by reloading the TB files from a Click.
One other new problem is a field into which I place an image somehow gets a text '0'. This is not difficult to correct but it never happened before.
Any thoughts please?
Regards John