Eric Martz wrote:


My suggestion would be that jmolApplet() continue to work as it does now, but that it be recoded internally along these lines:

function jmolApplet(...)
{
   document.writeln(jmolAppletString(...));
}

In other words, generate the string in a new function jmolAppletString() (just the old one slightly modified) and then you can use jmolAppletString(), while people already using jmolApplet() can continue without needing to change anything.


People can already use jmolApplet() without any changes. The return of the
string just adds more functionality. I'd argue against any more functions. And there are 6-10 more of these "document.write" commands scattered throughout Jmol.js. By changing

function _jmolWhatever{
 ...
 document.write(t)
 return
}

to

function _jmolWhatever{
 ...
 return _jmolDocWrite(t)
}

function _jmolDocWrite(s){
 if(_jmol.doc){
        if(_jmol.doc=="none")return s
        _jmol.doc.write(s)
        return s
 }
 document.write(s)
 return s
}

no changes will be observed by current users, and those with more advanced needs get what they need.


Bob




-Eric


/* - - - - - - - - - - - - - - - - - - - - - - - - - - -
Eric Martz, Professor Emeritus, Dept Microbiology
U Mass, Amherst -- http://www.umass.edu/molvis/martz

Protein Explorer - 3D Visualization: http://proteinexplorer.org
Workshops: http://www.umass.edu/molvis/workshop
Biochem Structure Tutorials http://MolviZ.org
World Index of Molecular Visualization Resources: http://molvisindex.org
ConSurf - Find Conserved Patches in Proteins: http://consurf.tau.ac.il
Atlas of Macromolecules: http://molvis.sdsc.edu/atlas/atlas.htm
PDB Lite Macromolecule Finder: http://pdblite.org
Molecular Visualization EMail List (molvis-list):
      http://bioinformatics.org/mailman/listinfo/molvis-list
- - - - - - - - - - - - - - - - - - - - - - - - - - - */



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

--

Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr

"Imagination is more important than knowledge."  - Albert Einstein


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to