Getting ready...
What exactly does the cross-platform TMessageManager class do? Put simply, it allows you to listen for events and assign actions to run when those events occur. Just like in VCL or FireMonkey, you know about mouse and keyboard events that occur on certain user interactions. These are very similar, except that we can emit events (or send messages) on our own, when we want to, and not necessarily based on user interaction or other mechanisms inside other components. TMessageManager is based on the publish/subscribe model because we can subscribe to a particular type of message and then publish it.
The other important question is this—Why would you use the event model? You already know that, in Delphi, the event model allows ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access