Hi Bob,
Thanks for the quick reply. That solved my problem and I've just updated
my app which now seems to be working perfectly with the new Jmol. It
would have taken me a long time to find that fix myself so I'm very
grateful for your help.
Cheers,
Chris.
Robert Hanson wrote:
> Chris,
>
> public OldJmolDemo(File pdbFile) {
> viewer = JmolViewer.allocateViewer(this, new SmarterJmolAdapter(null)
> );
> viewer.openFile( pdbFile.toString() );
> } // constructor
>
> needs to be changed to
>
> public OldJmolDemo(File pdbFile) {
> viewer = JmolViewer.allocateViewer(this, new SmarterJmolAdapter(null)
> );
> viewer.setAppletContext("",null,null,"")
> viewer.openFile( pdbFile.toString() );
> } // constructor
>
>
> Note comments in 11.6 JmolViewer.java:
>
> /**
> * This is the main access point for creating an application
> * or applet viewer. After allocation it is MANDATORY that one of
> * the next commands is either
> *
> * viewer.evalString("ZAP");
> *
> * or at least:
> *
> * viewer.setAppletContext("",null,null,"")
> *
> * One or the other of these is necessary to establish the
> * first modelset, which might be required by one or more
> * later evaluated commands or file loadings.
> */
>
> That interface was further changed in Jmol 11.7 so that we now have
> just the one call:
>
> static public JmolViewer allocateViewer(Component awtComponent,
> JmolAdapter jmolAdapter,
> String htmlName, URL documentBase,
> URL codeBase,
> String commandOptions,
> JmolStatusListener statusListener)
>
> For example, the Jmol 11.7 application uses:
>
> viewer = JmolViewer.allocateViewer(display, modelAdapter,
> null, null, null, appletContext = commandOptions,
> new MyStatusListener());
>
>
> Bob
>
>
>
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users