Hello all.
I'm a bit confused about the meaning of the various scope options provided by the system.util.sendMessage() function.
As the documentation states, the scope argument:
Limits the scope of the message delivery to "C" (clients), "G" (Gateway), "CG" for clients and the Gateway, or "S" Session. Any combination of C, G, and S are available. Defaults to "CS" if the user name, role, or host name parameters are set, and to "CGS" if none of these parameters are set. [optional]
Casually reading this left me pretty confused, especially coming from perspective.sendMessage(), which apparently accepts session as a scope argument but ignores it?
So I did some digging on the forums, which has mostly made me more confused because the terminology seems overloaded. I've gathered that for the purposes of sending a message from a view to all people with that view open I should be using the session scope in util.sendMessage(), but the answers I saw left me wondering what that scope actually is and why it is called a session scope.
Looking at the Designer, I can see that under Perspective there are Gateway Events and Session Events. It seems to me that I can create handlers more or less identically, though the Gateway Event has a lot more contextual information. I'm guessing that "Clients" are a Vision concept, which I am totally unfamiliar with.
If someone would be willing to explain each of the three scopes and how the messages reach handlers in detail I would be greatly appreciative.