I wrote a class and need to know "callback" to send events. Of course, I can transfer this value in Initialize. But it seems to me there is a way to avoid additional parameter.
For example, B4I allows to use Page1.Initialize("Page1") etc.
I looked OBJC code and see two additional input parameters in Initialize subroutine.
__ref looks useless for my needs, but what is (B4I*) _ba ?
I make a class, which I will include as source code (easy to correct).
As I understand, a problem is in setBIAndEventName. If I use self.bi, I get an event inside my class (expected). Guess, I need to use bi from main module, but I don't understand how to access it.
If the object is initialized inside a class then it is expected that the events will be raised inside the class. You can delegate the event to any other module by using CallSub.
Raising an event with main.bi means that you are building a broken library.