<@UE0E6UWAJ> The benefit to the direct controller ...
# tornadofx
c
@alex The benefit to the direct controller call is simplicity. You can navigate from the control code to the button code easily in an IDE. Also, you can call a specific controller function and pass it specific parameters and handle specific exceptions. With the EventBus, things need to be generalized a little (parameters have to go in maps, exception handling is centralized). The biggest benefit to the EventBus is the decoupling. If you look at the example I posted earlier, I can call the same functions from multiple places. Grant's suggestion is very solid. Call controller methods but post back asynchronous results via the EventBus.
👍 1