Notifications with arguments


#1

- ActionBroadcaster broadcast a String

- ChangeBroadcaster broadcast themself

- MessageListener can have a custom argument but no broadcaster

So I'm wondering if there is a MessageBroadcaster "somewhere" ? Should I do my own ?


#2

If you are a MessageListener you can send messages to yourself using:

void postMessage (Message* message) const;

You can derive from Message to create any kind of message you'd like.


#3

Okay but this message will be sent only to the instance of the MessageListener, what I'm looking for is how to send the same message to several MessageListener. That's why I'm looking for a kind of notification center to do this. If I have to know the MessageListener's object in order to send a message to it, I loose the benefits of a listener paradigm. I admit it is not very hard to build a broadcaster but I'm wondering if there is nothing already available in the framework doing this.