// be '|', but many sequence IDS include
// pipes.
+ /**
+ * We maintain a pointer to the jalview instance here, because only with that do we have a direct
+ * connection from the JavaScript "applet" object to the proper instance of Jalview in case there
+ * are multiple applets on a page.
+ */
+ private Jalview jalview;
+
- public JalviewJSApp(ArgsParser aparser)
+ public JalviewJSApp(Jalview jalview, ArgsParser aparser)
{
+ this.jalview = jalview;
this.aparser = aparser;
Platform.setAppClass(this);
}
try
{
- Jalview.getInstance().parseArguments(new ArgsParser(args), false);
+ jalview.parseArguments(new ArgsParser(args), false);
return null;
} catch (Throwable t)
{
*/
public String doSendCallback(Object callback, Object[] data)
{
- Jalview me = Jalview.getInstance();
+ Jalview me = jalview;
if (me != null && callback != null)
{