At 8/14/06, Bob Hanson wrote:
>Eric Martz wrote:
>>With messageCallback, each line of the header is returned as a separate
>>call, and I get to insert "\n" after each one, so it is platform independent.
>This surprises me, since messageCallback does not parse the header into
>separate lines on its way to the callback but instead takes the whole
>chunk and delivers it in one full swoop. Always has; always will. It uses
>the function:
>
> showString(modelFile.substring(0, ichMin));
>
>which means it shows the header as one single string. So I think you must
>be thinking about something else.
Thanks for the info about callback vs getProperty (off list).
I think you are incorrect about callback lines.
I am using applet 10.2.0.
My callback function (simplified for purposes of discussion) is
function jmolMessageCallback(appletNumber, message)
{
// COLLECT MESSAGES
if (collectMessages)
messageStream += message + "\n";
}
I use this to collect messages from "show pdbheader".
To debug, I display the messageStream in a browser window between
<pre>...</pre> tags.
Before I added the + "\n", the messageStream was one long line (verified by
escaping it to look for nonprintable characters) -- no line delimiters at all.
I like being able to add my own delimiter that is platform independent, so
my code that uses the messageStream only has to deal with one form of line
ending.
I am using arbitrary string signals in the message stream to detect when
the pdbheader is started and finished, and then initiate processing. It is
working fine in Firefox (Mac, Win), Safari (Mac) and IE (Win).
-Eric
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users