OK, this is an inappropriate wait() occurring at the beginning of the 
command evaluation.  I could reproduce it in Jmol.jar as well.

I've just committed an interim fix. Please see if it works. (bob200603)

Basically, the problem is that when you use scriptWait() it doesn't 
start a new thread for eval. But eval's own refresh() command executes 
viewer.repaintViewAndHold() -- and it's the wait() in that method that, 
of course, was blocking. Obviously you can't have the main thread wait 
for itself.

If others can suggest the "right" way to do this, that would be welcome. 
How is this sort of thing supposed to be handled?

My fix is not satisfactory. I think several things are broken:

  - can't load a file on the command line
  - can't use moveTo in a scriptWait() command.
  - refresh script command doesn't

What's the correct fix?

Bob



Andreas Prlic wrote:

>Hi!
>
>
>  
>
>>Has anyone else tried viewer.scriptWait() in application code?
>>It still hangs the app up for me.
>>    
>>
>
>  I just tried a checkout from the
>https://svn.sourceforge.net/svnroot/jmol/branches/bob200603/Jmol
>branch and doing a
>viewer.scriptWait(command);
>freezes my application.
>
>also doing
>
>  
>
>>void scriptWaitVoid(String strScript) {
>>    Eval e = new Eval(this);
>>    if (e.loadScriptString(strScript, false)) {
>>      e.runEval();
>>    }
>>}
>>    
>>
>
>does not help...
>
>Andreas
>
>
>-----------------------------------------------------------------------
>
>Andreas Prlic      Wellcome Trust Sanger Institute
>                               Hinxton, Cambridge CB10 1SA, UK
>                        +44 (0) 1223 49 6891
>
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys -- and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>_______________________________________________
>Jmol-developers mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-developers
>  
>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to