Hey, im trying to debug some complex code i wrote, and im wondering if getEventRelativeTo() has been changed in any way?
No, don’t think so.
I think I encounter the same problem.
I upgraded from 1.46 to 1.50 (I have done a checkout just before the 1.51 release ) and I have problems with component calling recursively getEventRelativeTo() in mouseDown
For instance:
void ChildComp::mouseDown(const MouseEvent& e)
{
Component* parent = getParentComponent();
if(parent)
parent->mouseDown(e.getEventRelativeTo(parent));
}
Am I doing something wrong?
[edit]
I looked a little bit in the MouseEvent code and I think this is because eventComponent is always initialized with originator so it is not updated with otherComponent as it was in 1.46 code
I added the eventComponent to the constructor and it solved my problem.
Kevin
Ah - I think you might be right there… Thanks, I’ll sanity-check that right away!