How do I communicate from a class to the root?
I’ve got a class that does some different things including communicating with a webserver. When it does its thing, I want it to communicate that back to the main part of the program.
I’m thinking that an eventdispatcher could do it, but I haven’t been able to get it working right.
When all is said and done in my class, I tried including:
dispatchEvent(new Event(“done”));
and then in the root of the program, I’ve got an event listener that I invoked like so:
callClass.addEventListener("done",________);
However, it seems that it never gets the event dispatched.
What am I missing?