Questions tagged [event-dispatching]

105 questions
1
vote
2 answers

Symfony - Event not being dispatched

This is the first time ever I am working with creating custom event dispatcher and subscriber so I am trying to wrap my head around it and I cant seem to find out why my custom event is not being dispatched. I am following the documentation and in…
Saadia
  • 856
  • 1
  • 12
  • 32
1
vote
0 answers

(symfony event dispatcher) when to dispatch an event?

I'm using Symfony EventDispatcher in my project. There is a trade/pay system in my project, user can create an order, the order's status is unpaied, when user paid the order by paypal, paypal will trigger a trade finish hook, my project's…
leo108
  • 817
  • 5
  • 12
1
vote
1 answer

Triggering click events from within a FF sandbox

I am trying to trigger a click event on an element on a page from within a Firefox sandbox. I have tried using jQuery's .click() as well as doing: var evt = document.createEvent("HTMLEvents"); evt.initEvent("click", true, false…
1
vote
2 answers

In ActionScript3, how to catch ErrorEvent that I've dispatched?

At some points in my application, I've a try-catch block such as: This happens inside classes that are not in the display list (not Sprites, nor any kind of DisplayObject), but extend EventDispatcher. Those classes reside in externally loaded SWF…
Martin Asenov
  • 1,288
  • 2
  • 20
  • 38
1
vote
6 answers

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I've been advised in another SO question to write a custom event. I tried this before but I couldn't figure…
1
vote
1 answer

dispatchEvent or checking variable every frame? What's better in a simple parent-child-relationship?

Say I have a parent- and a child-object. At some point a variable (boolean) in the child changes and the parent needs to notice. Now, is it performance-wise cheaper to let the child dispatch an event once the variable has changed, or to have the…
1
vote
1 answer

Best way to develeop plugin compatible application. Dependency injection?

I'm wondering the best way to create fully compatible application to plug-ins. I'm used to Wordpress plug-ins concept that you can define actions and filters and then use in your plug-ins. So others can define methods on their plug-ins that are…
Genar
  • 433
  • 3
  • 22
1
vote
1 answer

Call paint method from an inner class

I have a sample code that is simply to build a JFrame with a rectangle and a few buttons. I completed building the rectangles and now i'm onto placing two buttons, one start - top and one stop - bottom. I have everything working, at least the…
1
vote
1 answer

As3 dispatch mouse_down event on Sprite

I have this actionscript code. What i'm trying to do is to trigger a mouse event on imgSprite, which is a child element of imageContainer. I was expecting it to triger it on the mouse coordinates on imgSprite, but instead it uses the last loaded…
monolith
  • 1,606
  • 1
  • 12
  • 21
1
vote
2 answers

Text problems with JPanel

After thinking I was on course to solving a problem with making text (read from a file) appear in a JPanel, I`m frustratingly back to square one. The code is below. The result is just a blank screen 400x500 screen. Some combinations of using…
1
vote
1 answer

A label or any component that moves from one place to another in JFrame

I am trying to move an label/icon & button from one place to another place using setLocation method but for some reason the objects are moving but not in motion. So if any one knows how to do this thing please tell me. How to create a label or any…
Vighanesh Gursale
  • 921
  • 5
  • 15
  • 31
1
vote
2 answers

How to rotate the square in my swing app

I have developed a little swing application in which i have drawn a square.Now i want to rotate this square at its center using Thread.The problem i'm having is how to get reference to that square in my rotateSquare() method. (Actually i need a…
Naveen
  • 7,944
  • 12
  • 78
  • 165
1
vote
1 answer

Java Swing GUI frozen on refocus

I have a Swing GUI running on WinXP. Sometimes, when i do something else (surf on the web...) and then i want to go back to my program, the GUI appears but is totally frozen, i can't do anything on it. I have to wait (it can be 10sec or 5min)…
caRameL
  • 633
  • 6
  • 15
1
vote
2 answers

Updating the JPanel in a JFrame

I have a JFrame with a CardLayout component. I am using the CardLayout to switch between different JPanel's at different moments of the application execution. At some point I am using a SwingWorker Object to generate some XML files. In this time I…
Mike
  • 111
  • 2
  • 9
1
vote
2 answers

Event Dispatching in .NET

I've got a stock-standard ASP.NET MVC 3 web application. I've got several cross-cutting concerns, and i wish to employ some AOP, most notably the event dispatcher pattern. For example, i wish to "raise an event" in my controllers when something…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647