My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 2: Some broadcasting events don't get dispatched
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Jan 2011


 
Reported by rkardas...@gmail.com, Dec 22, 2010
When dispatching one action to multiple objects (that are subscribed to this action) of one class, some objects don't get notified.

To reproduce the problem, build and run the simple project (see the attached archive). Pressing any key at runtime will create the number of objects, next press will attempt to remove them, the next one - create again, and so on. You can notice that every second object (#0,2,4.. or #1,3,5..) don't get notified. For more information, see the source code comments.

Maybe I missed something, but this project is really small... NResponder is a great framework and I want to use it! I hope this problem will be solved soon.

I use Windows 7 build 7600, FlashDevelop 3.3.1, Flex SDK 3.4.1, SWFs running in standalone debug player 10.1 r82.
temp_project.zip
29.3 KB   Download
Jan 26, 2011
Project Member #1 dineybomfim
Hi man!

We've talked about early in January, right?

Your problem is because the weak references in your code.
You can't let the NResponder be responsible to store that last reference to your objects. In other words, you can't do something like this:

NResponder.addNative(new MyObject(), MouseEvent.MOUSE_DOWN, clickHandler);

In your code you did almost the same.
But you created "new MyObject()" without bind a variable to it, and inside it create NResponders. This cause weak references inside NResponder.

NResponder doesn't deal with your references, just manage and control your events.
Status: Invalid
Jan 30, 2011
#3 rkardas...@gmail.com
Sure, you can close the issue now. But I think you have to mention this in the documentation.

Powered by Google Project Hosting