OK, Rolf and Angel, and other who may use messageCallbacks to parse for errors:

I've checked in code that should do the trick. This will be part of
Jmol 11.7.17.

 errorCallback(app, message, objectID, untranslatedError)
 scriptCallback(app, message, statusID, untranslatedError)

These two callbacks allow reading of errors in the untranslated form
and also displaying of errors and messages (via messageCallback) in
the translated form.

If neither of these callbacks is defined but messageCallback is
defined, then message translation is turned off. I think I've fixed
the bug in Jmol 11.6 that was causing messages to be translated even
if messageCallback was present - the design (as in Jmol 11.4) is for
messageCallbacks to not be translated ever.

The way it works now is that if you just use messageCallback, then
error messages are not translated. That's compatible with Jmol 11.4.
Now, though, if either errorCallback or scriptCallback is defined, we
allow messageCallbacks to return translated error messages -- so Jena,
for example, can report those to a user. Since these other two
callbacks also report the untranslated error message, this allows the
web page designer to parse error messages without worry of
translation. (In addition, jmolGetProperty("errorMessage") now always
reports the UNtranslated error message.

Rolf can have his cake and eat it, too.

Bob


Bob


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to