Message handler "view" listen scope not working?

I noticed that the “view” listen scope doesn’t seem to pickup messages on the same view, I have to set any component message hander to include “page” for it to work.

Example:

A Tree component has a message handler on it with listen scope set to view only.
A separate button is on the same (coordinate view). No other containers or components exist on the view.
The button calls the message handler.

It only works if I set the message handler to include ‘page’ that it works.

Am I missing something?

1 Like

You need to specify the scope. By default it uses “page”
system.perspective.sendMessage(messageType = "message", scope = "view")

oh ha well that makes sense thanks!

Just setting the scope did not fix the issue... I had to include the messageType="message" param too for it to start working! Thanks for including this example to copy/paste :slight_smile:

Well, messageType is the name of the message to be sent and should match the name of the handler catching it... You can't possibly expect it to work without this parameter !

2 Likes