From: Finn B. <bc...@us...> - 2000-11-14 20:35:17
|
Update of /cvsroot/jython/htdocs/applets In directory slayer.i.sourceforge.net:/tmp/cvs-serv27108 Modified Files: JythonLoader.java Log Message: Do not use getAppletContext().getApplets(). It can cause security exceptions on IE if there are applets loaded from other domains. Instead we wait for a specificly named applet to become available. Index: JythonLoader.java =================================================================== RCS file: /cvsroot/jython/htdocs/applets/JythonLoader.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** JythonLoader.java 2000/11/12 22:51:37 1.1 --- JythonLoader.java 2000/11/14 20:35:12 1.2 *************** *** 7,10 **** --- 7,11 ---- Thread timer; long initialTime; + String waitFor = "HelloWorld"; public void init() { *************** *** 38,41 **** --- 39,46 ---- bag.setConstraints(etime, c); add(etime); + + String n = getParameter("waitFor"); + if (n != null) + waitFor = n; } *************** *** 51,62 **** private int activeApplets() { ! Enumeration e = getAppletContext().getApplets(); ! int n; ! for (n=0; e.hasMoreElements(); ) { ! Applet a = (Applet)e.nextElement(); ! if (a != null && a.isActive()) ! n++; ! } ! return n; } --- 56,63 ---- private int activeApplets() { ! Applet a = getAppletContext().getApplet(waitFor); ! if (a != null) ! return 2; ! return 1; } |