[brailleblaster] Re: How do I get this notifyListeners addListener to work

  • From: "Susan Jolly" <easjolly@xxxxxxxxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Thu, 16 Jun 2011 08:27:27 -0600

There are two actors involved in listening: the listener and the what I'll call the broadcaster. GUI components have built-in logic to broadcast certain events in response to certain user actions. MenuItems, for example, have logic to broadcast the event that they've been selected. Other GUI components have logic to broadcast other types of events.


When an object registers itself as a listener for an event it does this by asking an appropriate GUI component to add it as a one of its listeners for a specific type of event. This only works if that GUI was already set up to broadcast that event. A GUI's API will tell you what events it is designed broadcast.

HTH,
Susan

Other related posts: