Closed jaclas closed 3 years ago
I created a pull-request to address your issue:
Added two new methods:
I added new methods instead of overloading the existing ones, for two reasons:
This should fit your needs. You might want to check out my fork: https://github.com/wxinix/delphi-event-bus
hi all, I agree with @wxinix : make the intention clear . I'm going to approve the PR
thx
Please add the parameter ARaiseExcIfEmpty : Boolean to the RegisterSubscriber() method to pass it on to the FindSubscriberMethods() method. At the moment, in the RegisterSubscriber() method, when calling the FindSubscriberMethods() method, this parameter is hardcoded to True, it should not be so, see:
I have a problem with this because I have a base class that supports caching and I want to call RegisterSubscriberForEvents() in this base class (not to do this in many inherited classes). But because not every descendant cache class uses events, I get an EObjectHasNoSubscriberMethods exception in runtime.
And of course a change is necessary in these two methods