I’m trying to refactor some code that currently uses a ChangeBroadcaster to send objects* to registered listeners (ChangeListeners). Searching the docs and forums, I’ve learned that Changelisteners weren’t designed for passing information around as I’m intending to (for my purposes, coalescing multiple changes into fewer callbacks is unfortunately undesirable).
I’ve been trying to figure out the right Broadcaster/Listener system to do this, but I am a bit confused. I thought I could pack my information in a Message object (or derive my own class from Message), but I don’t see how to register listeners and broadcast Messages to them. From what I gathered, MessageListeners can only post Message objects to and from themselves.
I next looked into ActionBroadcasters/ActionListeners, but it seems that they can only be passed Strings, not void* or Message objects.
Any insight would be greatly helpful! Thanks…
BTW, I apologize in advance if the answer to this is somewhere in the forums-- I’ve done a big of digging tonight and have found very useful information about changebroadcasters, changelisteners, actionbroadcasters, other callback systems, etc, but haven’t yet stumbled across a solution!