Data from pgSplitToArray

Hi Clifton,
Had a rather frustrating day yesterday with two problems I couldn't understand. It took me hours to find solutions.
The second problem was due to my superficial reading of the notes about htmlVideoLoader. When I first started converting my program from VB.NET to TB/Powerpac the results were acceptable but my programming structure was rambling and messy. I have since discovered shared actions and object methods and so I am currently doing some necessary tidying up. I think you have added some refinements to htmlVideoLoader. In my first program I guess the video was automatically reloaded when it reached the end so the currentTime property was reset to 0. In the latest version of htmlVideoLoader this is not the case. It took me a long time to understand what was happening: the currentTime property was still set to currentTime corresponding to the end of the video when the video restarted. This was a disaster for my system which relies on the currentTime value to carry out its tasks. I have now discovered that the loop parameter can be set to rewind or reload which solves the problem.
I have found a solution to the first problem but I still don't understand it. I use a text file to get data and instructions about what the program has to do. I get it from the server with XHTMLHttpRequest - no problem. The data is divided into textlines and items (Toolbook influence). I get the textlines by using pgSplitToArray with crlf as the splitExp parameter and I get the items using getItemFromStack. One of the textlines contains the length in milliseconds of the media file to be exploited. In this case the video was very short about 32 seconds: 32450 ms. When the video is loaded I display the 1/4 1/2 3/4 and full length in min:sec. As you advised I used pgDateFormat to achieve this. I put the 'textline' containing the length into a variable called medialength so the code was basically medialength * 0.25 => pgDateFormat => chars 4 to 8 of output etc. This worked fine for 1/4, 1/2 and 3/4 but the full length medialength => pgDateFormat produced 00:00:00. I tried all kinds of variations but nothing worked until in desperation I did mediaLength * 1 => pgDateFormat. This worked! I'm guessing that the data extracted by pgSplitToArray was somehow not a 'pure' number and the process of multiplying by 1 restored its 'purity'. Any ideas? I looked for pgTrim but didn't find it.
I have another question but I'll start another topic.
Had a rather frustrating day yesterday with two problems I couldn't understand. It took me hours to find solutions.
The second problem was due to my superficial reading of the notes about htmlVideoLoader. When I first started converting my program from VB.NET to TB/Powerpac the results were acceptable but my programming structure was rambling and messy. I have since discovered shared actions and object methods and so I am currently doing some necessary tidying up. I think you have added some refinements to htmlVideoLoader. In my first program I guess the video was automatically reloaded when it reached the end so the currentTime property was reset to 0. In the latest version of htmlVideoLoader this is not the case. It took me a long time to understand what was happening: the currentTime property was still set to currentTime corresponding to the end of the video when the video restarted. This was a disaster for my system which relies on the currentTime value to carry out its tasks. I have now discovered that the loop parameter can be set to rewind or reload which solves the problem.
I have found a solution to the first problem but I still don't understand it. I use a text file to get data and instructions about what the program has to do. I get it from the server with XHTMLHttpRequest - no problem. The data is divided into textlines and items (Toolbook influence). I get the textlines by using pgSplitToArray with crlf as the splitExp parameter and I get the items using getItemFromStack. One of the textlines contains the length in milliseconds of the media file to be exploited. In this case the video was very short about 32 seconds: 32450 ms. When the video is loaded I display the 1/4 1/2 3/4 and full length in min:sec. As you advised I used pgDateFormat to achieve this. I put the 'textline' containing the length into a variable called medialength so the code was basically medialength * 0.25 => pgDateFormat => chars 4 to 8 of output etc. This worked fine for 1/4, 1/2 and 3/4 but the full length medialength => pgDateFormat produced 00:00:00. I tried all kinds of variations but nothing worked until in desperation I did mediaLength * 1 => pgDateFormat. This worked! I'm guessing that the data extracted by pgSplitToArray was somehow not a 'pure' number and the process of multiplying by 1 restored its 'purity'. Any ideas? I looked for pgTrim but didn't find it.
I have another question but I'll start another topic.