I use the messagecallback() function to catch it. I am not sure if this is the 
best solution since the rest of the jmol commands after the load will still 
execute even if you catch the error, but it does the job for me.

if (msg.indexOf("ERROR")>=0 && msg.indexOf("load >>") >= 0) {
    alert(msg);
    load_success = 0;
    }

> From: [EMAIL PROTECTED]
> To: [email protected]
> Date: Mon, 16 Jun 2008 17:10:03 -0400
> Subject: [Jmol-users] notifyFileLoaded did not notify
> 
> Hi Bob and Jmol developers,
> 
> We embedded Jmol in our applications. But since version 11.4.(RC1 -4), the 
> JmolStatusListener was not trigged if the viewer failed to load a file (wrong 
> file format or bad URL). But the Jmol console window had the correct error 
> messages. For example, enter this URL (with wrong PDB ID) to the Jmol Java 
> application File-> Open URl
> 
> http://www.rcsb.org/pdb/files/2UBI.pdb.gz
> 
> The Jmol window was not changed and the script console window has these 
> messages:
> java.io.FileNotFoundException: http://www.rcsb.org/pdb/files/2UBI.pdb.gz
> ----line 1 command 1 of file null:
>          script "http://www.rcsb.org/pdb/files/2UBI.pdb.gz"; <<
> Script completed
> 
> >From my application, the JmolStatusLisener's notifyFileLoaded was not 
> >triggered when loading a file failed, but it was triggered when a file was 
> >loaded successfully. The notifyFileLoaded used to work for both cases before 
> >11.4.X.
> 
> Is these a known issue? If this is intended behavior, is there any way to be 
> notified when loading a file script failed?
> 
> Thanks in advance,
> 
> Li Yang
> 
> 
> 


_________________________________________________________________

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to