Hello,
I am trying to make use of the KeyPressed signal via a ACLIC dispatcher. The problem is, that it seems that on the Python side it looses the 4th parameter. Inside the dispatcher I have:
PyObject* Dispatch( TGFrame* o1, UInt_t k, UInt_t m)
{
cout << o1 << " " << k << " " << m << endl;
return DispatchVA( "li", o1, k, m);
}
which properly displays both the key “k” and the mask “m”. On python side:
def handle_list_key(self, frame, key, m):
entry = ROOT.BindObject(frame, "TGLVEntry")
# If dbl click was made with left mouse button
print entry.GetItemName(), key, mask
def _init_(.....):
self.list_dispatch_key = ROOT.EtosDispatcher(self.handle_list_key)
self.eventlist_container.Connect("KeyPressed(TGFrame*, UInt_t, UInt_t)", "EtosDispatcher", self.list_dispatch_key, "Dispatch(TGFrame*, UInt_t, UInt_t)")
this way it doesn’t work:
If I remove the “m” parameter from handle_list_key definition, it works, however I don’t get mask, of course. I guess TPyDispatcher from which my dispatcher inherits works only up to 2 parameters?