ah, one more thought!
Try
var infoString = jmolScriptWait("shapeInfo")
or
var V = jmolGetPropertyAsArray("shapeInfo").Draw.obj[0].vertices
array V will now be a full list of the vertices for all models.
Bob
> [EMAIL PROTECTED] wrote:
>>when you use "show draw" you don't add any qualifiers
>>
>>draw border1 #sort of a "select" for DRAW -- sets "current" object
>>show draw #shows current draw object
>>
>>should give something like:
>>
>>draw border1 {23.890585 32.710503 10.786414} {21.773388 34.16974
>> 10.07222}
>>{20.224413 32.710503 11.682588} {22.34161 31.251266 12.396782}
>>
>>
>>I suspect the reason it seems unpredictable is that sometimes you had the
>>object selected, and sometimes not. But if I'm wrong, reply with the
>> exact
>>wording of the script that is causing the problem.
>>
>>Also, something I keep doing is I sometimes accidentally put the $ in:
>>
>> draw $border1
>>
>>DON'T DO THAT.
>>
>>
> This didn't make a difference. But I found out that the coordinates are
> only provided if a specific frame is displayed, not with 'frame all' set
> before.
> Since we add amino acid variants as new models in our Jmol viewer,
> 'frame all' is always set initially.
>
> In this context I noticed that Jmol freezes if the frame number is not
> specified and not all atoms specified in the 'draw' command are present
> in all frames. The java console shows the following error message:
>
> java.lang.NullPointerException
> at javax.vecmath.Tuple3f.sub(Tuple3f.java:225)
> at org.jmol.viewer.Draw.scaleDrawing(Draw.java:462)
> at org.jmol.viewer.Draw.setProperty(Draw.java:197)
> at org.jmol.viewer.Frame.setShapeProperty(Frame.java:1092)
> at
> org.jmol.viewer.ModelManager.setShapeProperty(ModelManager.java:386)
> at org.jmol.viewer.Viewer.setShapeProperty(Viewer.java:2463)
> at org.jmol.viewer.Eval.draw(Eval.java:5039)
> at org.jmol.viewer.Eval.instructionDispatchLoop(Eval.java:634)
> at org.jmol.viewer.Eval.runEval(Eval.java:104)
> at org.jmol.viewer.Viewer.evalStringWaitStatus(Viewer.java:2289)
> at org.jmol.viewer.ScriptManager.runScript(ScriptManager.java:130)
> at org.jmol.viewer.ScriptManager.runNextScript(ScriptManager.java:119)
> at
> org.jmol.viewer.ScriptManager$ScriptQueueRunnable.run(ScriptManager.java:147)
> at java.lang.Thread.run(Thread.java:534)
>
>
>>>The next issue (if 'show draw' works correctly) is to read the
>>>information from Jmol and to generate the corresponding 'echo' command.
>>>To avoid parsing the message callback stream, I tried the
>>>'jmolScriptWait' command for the first time. But it totally freezes
>>>Firefox 1.5.0.7 with Java 1.4.2_11 on SuSE linux 9.3. The browser
>>>freezes independant of the script command I used.
>>>
>>
>>Interesting -- this means that those browsers are using the event queue.
>>David Evans at Eli Lilly had this problem with the application (as
>> opposed
>>to the applet). The solution for applications was to make sure you call
>>scriptWait() from a new thread rather than the one associated with a user
>>action, like clicking a button.
>>
>>Something to try: If the jmolScriptWait function is being run because the
>>user has clicked on a link or button, try making sure that the button
>>method looks like this:
>>
>>
>> onClick="setTimeout('clickAction()', 100)"
>>
>>
>>the 100-ms delay won't be noticed by the user, but a new thread is
>> started
>>that isn't the event queue thread. So it shouldn't hang the program. Then
>>
>>function clickAction() {
>> var info = jmolScriptWait("draw $border1;show draw")
>>}
>>
>>If anything will work, that stands the best chance.
>>
>>I seem to remember having this sort of problem with Opera browsers some
>>eons ago, even with regular scripting, and the only solution was to use
>>setTimeout() this way with every user-derived action.
>>
>>
>>
> Unfortunately it doesn't work. Without 'jmolScriptWait' in 'clickAction'
> the method works, but with it the browser freezes.
>
> Regards,
> Rolf
>
> -------------------------------------------------------------------------
> 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
>
-------------------------------------------------------------------------
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