load molecule dynamically ?

User 6e47cbf906

13-03-2006 03:51:08

Hi,


Can I use MSpaceApplet.openMolecule to load molecule dynamically after user select one ?


Any example to do that ?





Thanks

ChemAxon 909aee4527

13-03-2006 12:45:48

Hi,


unfortunately that method cannot be used runtime, just to load molecules before the applet starts. The capability of the applet class in MarvinSpace 1.0 was just enough to create some simple examples. We rather focused on the functionalities and the api of the core classes.


A short-term solution could be to set a menubar to the applet by a simple applet parameter: <param name="menubar" value="true">, and you will be able to load files by the File->Open... menu.





The extension of the api of the applet is already in the pipeline. This will solve the restriction of accessing files through JavaScript as well.


New applet and application examples are under construction and will be available with the new Marvin release which will include MarvinSpace 1.3.

ChemAxon 909aee4527

22-03-2006 10:38:19

I didn't write this explicitly in my previous reply, but of course you can also write your own applet class that uses MarvinSpace and resolves accessing files through JavaScript.


You can get any help with the MarvinSpace API if you need.


An example that describes creating a simple applet will be available soon.