Java Question Raising an event from a handler?

thedesolatesoul

Expert
Licensed User
Longtime User
Is it possible to raise an event from a handler?
Would I need to hold a final reference of BA inside the wrapper?

For instance:

B4X:
public class MyObjWrapper {
   MyObj mObj;
   MyParam mParam;
   
   Handler mHandler  = new Handler() 
   { 
      @Override
      public void handleMessage(Message msg)
      {
                        ba.raiseEvent(this.getObject(), eventName + "_received");
       }
   };
}

How do I get ba inside handle message?

Do I store myBA = ba, in Initialize? Does it have any consequences to store a reference to the ba object?
 
Top