#17 Resubmission of patch #1774878

closed
nobody
File IO (8)
5
2008-08-14
2007-08-15
Jonathan Gutow
No

Previous submission of changes to templates and the java code was included in this description. I am resubmitting it as a file below.

Sorry for any problems this caused. Jonathan

Discussion

  • Jonathan Gutow
    Jonathan Gutow
    2007-08-15

    plain text patch generated by Eclipse.

     
    Attachments
  • Bob Hanson
    Bob Hanson
    2007-08-15

    Logged In: YES
    user_id=1082841
    Originator: NO

    A few issues here:
    <script>
    var appletpath = "@APPLETPATH@";
    var pathtojmolscripts= appletpath+"/Jmol.js";
    </script>
    <script src="JmolPopIn.js" type="text/javascript"></script>
    <script src="@APPLETPATH@/Jmol.js" type="text/javascript"></script>

    Can you tell me what is intended? The variable pathtojmolscripts is not used. Why would one want to know this path? All scripts (spt files) used by the applets must be in the same directory of the data files -- this is because we are using the path to the data files as a variable and defining

    set defaultDirectory "."

    for the applets. That also sets the default path for the scripts.

    I'm also not seeing why you would want to separate the user-definable settings of dataDir and appletpath so far apart.

    We seem to also have lost @APPLETDEFS@, which is important in the case of

    SET webMakerCreateJS true

    Good idea to remove putJmolDiv -- that I like, except for the fact that now there are links that if there is no JavaScript appear and are improper. To do this right, you need to make the "click here" part with JavaScript -- so if there is no JavaScript, then that link does not show up, and the image appears properly. But I like the idea of having the background div part being NOT JavaScript.

    In PopUpJmol.java:

    s = TextFormat.simpleReplace(s, "@SCRIPT@", name+".spt");
    s = TextFormat.simpleReplace(s, "@IMAGE@", instance.pictFile.substring(instance.pictFile.lastIndexOf("/")+1, instance.pictFile.length()));

    I can't see the reason for the first. Why not just have ".spt" in the file, and then use only @NAME@?

    What is the reason for the @IMAGE@? This is just @NAME@.png, is it not?

    Let's discuss it....

    Bob

     
  • Bob Hanson
    Bob Hanson
    2008-08-14

    • status: open --> closed