Questions tagged [event-dispatching]

105 questions
4
votes
4 answers

In Java how do I repaint a panel from an actionPerformed thread while it is currently running?

I have a class (called Class_GUI) which has a panel with lots of buttons on it. Class_GUI has some methods that change the text and colour of the buttons. I have also have a program with the actionPerformed method. When this is called it creates an…
4
votes
1 answer

handling swing exceptions in scala application

I'd like to use swing for a scala GUI. The application state is handled by akka actors and may be restored with its fault tolerance. I'd like to restore application after a swing fault. I've found several recipes for java programmers for…
ayvango
  • 5,867
  • 3
  • 34
  • 73
3
votes
2 answers

Singleton Swing Component

I am developing a swing app, where I have a Factory class which provide Component keeping Singleton in mind. Like: public final class ComponentFactory { private static LibraryFrame libraryFrame; private static LibraryTableScrollPane…
Tapas Bose
  • 28,796
  • 74
  • 215
  • 331
3
votes
2 answers

Firefox 5 dispatchEvent in Firefox

I have some code that uses dispatchEvent to simulate clicks and the same exact code works fine in Chrome but doesn't work in Firefox. Here's the code: var evt =…
David K.
  • 6,153
  • 10
  • 47
  • 78
3
votes
3 answers

Multi-threaded Event Dispatching

I am developing a C++ application that will use Lua scripts for external add-ons. The add-ons are entirely event-driven; handlers are registered with the host application when the script is loaded, and the host calls the handlers as the events…
3
votes
7 answers

I can't dispatch custom event from one module to another as it gives TypeError: Error #1034: Type Coercion failed:

I am trying to dispatch a custom event from one flex module to another. The code which dispatch the event is as below Application.application.Destination.child.dispatchEvent( new AlgoEvent(AlgoEvent.GETFROMPARENT_LOCAL_EVENT)); here AlgoEvent…
Ganapa
  • 73
  • 1
  • 9
3
votes
1 answer

cocos2d-x EventDispatcher is not a singleton any more?

I use cocos2d-x 3.0 RC1, and I have the following question. As I knew, cocos2d-x had a single (centralized) event dispatcher, and it was implemented as a singleton so that I could send event from everywhere to anywhere. Now in the final version it…
Narek
  • 38,779
  • 79
  • 233
  • 389
3
votes
2 answers

What is the EventDispatcher on a Bloomberglp.Blpapi.Session for?

Bloomberglp.Blpapi.Session has a constructor that looks like this: public Session(SessionOptions, Bloomberglp.Blpapi.EventHandler, EventDispatcher); The EventDispatcher class looks like this: public sealed class EventDispatcher { public bool…
tweakch
  • 426
  • 3
  • 13
3
votes
2 answers

Java Swing : How to invoke stopCellEditing() before TreeListeners:valueChanged?

This is a follow-up to these earlier questions: How to stop editing with DefaultCellEditor when a separate JBtton is pressed Sun Bug 4724980: JTable: Add API to control what happens to edits when table loses focus. When I use the…
Touko
  • 11,359
  • 16
  • 75
  • 105
3
votes
2 answers

JTable.removeColumn() method throws exception

To hide a column from only the view of JTable, i am using the removeColumn() method. But it throws the exception Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 7 >= 7 at…
Sanjeev
  • 397
  • 1
  • 8
  • 20
3
votes
2 answers

Passively listening on a socket for a chat application

I am currently developing a chat application which is quite basic overall, however I am encountering problems when receiving strings from both the client and the server side. I am using a thread to passively listen on the socket for incoming…
Andrei0427
  • 573
  • 3
  • 6
  • 18
2
votes
1 answer

Event Flow between Siblings Objects in Flex

I have a menubar and a custom component in my main application in Flex. On clicking a menu item in the menubar, I need a custom event to be raised which could be listened by the custom component as well. Or it can be the menu event also, raised when…
2
votes
1 answer

dispatchEvent not preforming event, but returns true

On MDC's site they have a cool demo of dispatchEvent that works fine in my Chrome 15. I'm trying to take an event object and pass it into dispatchEvent, and have set up a simple case here where you record events as an array then will replay them. In…
Incognito
  • 20,537
  • 15
  • 80
  • 120
2
votes
3 answers

Whats the appropriate form when dispatching events in AS3?

I was wondering what the appropriate form was when creating custom events? Should one create a CustomEvent class, and then create a temporary dispatcher in the function, and dispatch the CustomEvent. or is it better to attempt to create a…
2
votes
1 answer

Is an Event Dispatcher the appropriate solution?

I'm working on a API project that needs to send emails and store statistics after (or before depending on the implementation) the response has been returned to the client. For both cases I'm considering the Symfony's EventDispatcher component (I'm…
Khriz
  • 5,888
  • 6
  • 34
  • 39