![]() ![]() With event bus, you can declare TOpenHelp event type and then you can subscribe some code to such event type. ![]() If you have many forms that need to open help form will create tight coupling between all those forms and help form. But in that case your form with button needs to know about help form. For instance if you click Help button on some form, you would want to open Help window from its OnClick event handler. ![]() main difference (besides multithreading support) is that with button and its event handler there is usually deeper connection and there is direct link with the button and its event handler. ![]() When user clicks a button code in the OnClick event handler will run. Maybe the easies way to explain what is event bus is comparing it to a Button OnClick event handler. Because, it is thread-safe, it also has some additional features like dispatching events (messages) asynchronously in the background thread. If you want to send messages across multiple threads you need a thread-safe event bus, like NX Horizon. Main difference is that System.Messaging is not thread-safe and you can only use it to send messages in the context of the main thread. Delphi already has basic event bus implementation in System.Messaging (Delphi) You can also look at the examples there as those use cases apply to my event bus, too. I will need some time to prepare some meaningful examples that can show potential use cases.Įvent bus is a messaging system. It would be great if you could upload some examples to the github repository. So far I have no experience with an event bus to be able to estimate whether I can use the library in my small hobby projects.įor me (and I'm sure for others) a few small practical examples would be very instructive. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |