|
ECS-L Home Automation and Security Archives |
learn more
| view messages for this
month | NetBloc® | terms of use | search
subject (prev) or (next) |
time (prev) or (next) |
author (prev) or (next) |
view more subjects
Subject: From: Date: | JAVA enum help req Mark Gilmore Fri, 24 Mar 2000 14:43:49 -0500 |
Hi all,
Could use some JAVA help here:
I have one JAVA applet that handles all I/O to/from ECS, and
sends messages to other applets in it's web page as appropriate.
In this applet's start() logic, I enumerate to find these applets
and check their parameters:
Applet applet;
Itm_stt itm_stt_applet;
String par;
enum = getAppletContext().getApplets();
while (enum.hasMoreElements())
{
applet = (Applet)enum.nextElement();
par = applet.getParameter("Item"); // see if this is an "Itm_stt"
applet:
if (par != null) // "Item" par defined ?
{
* itm_stt_applet = (Itm_stt)applet; // CRASHES here
...
}
}
BUT when I have a number of applets in a page, it APPEARS that
the other applets are not always "ready" (at least that's what I
suspect). The line above marked with an astrisk crashes as follows:
java.lang.ClassCastException
at Ecsio.start(Compiled Code)
* at
netscape.applet.DerivedAppletFrame$StartAppletEvent.dispatch(Compiled
Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
Code)
I have verified that the applet IS the one desired.
Any help would be greatly appreciated.
BTW, I AM making great progress with the TCP/IP API
(it's just taking more time than I would have hoped).
--
Mark Gilmore
Omnipotence (ECS home automation software)
http://www.usit.com/omnip
423-745-0026
subject (prev) or (next) |
time (prev) or (next) |
author (prev) or (next) |
view more subjects