Maybe the Component bounds overlap in a way that doesn’t let the events through to them. (They could still be visible if there are transparent component areas involved.) But if it isn’t about that, can you show how your code is structured?
WFIW I still have not been able to figure out what’s up with this (too busy coding other parts of the application). I don’t have the listeners in the main app class - the listener is in the constructor of the component of the class where the button is in. Let’s call that class A, and class A has buttons and listeners to those buttons. If I add the A class component to the application base component everything works as expected. When I add the component as a child to another component of say class B, which is in turn a child of the main app, the button in A no longer react to listener events. Very strange.
you verified, that the components are actually active (visible) and react to normal mouseEvents (possible check: override mouseDown())
If that doesn’t happen: did you change hitTest()? does that return true?
If the events are happening, is there something that recreates the buttons? Happened recently to me… this will obviously delete your events with it
Is there more than one layer of components? (was suggested before)
Which component is created under what component shouldn’t matter. It matters, if the components are visible, the events are tested front to back, and each children list last to first (making the last sibling the front most).
Thx. As said I’ve parked this issue because of too much work on other parts of the code. Not at my desk right now but some aswers to your questions:
components (buttons, drawn boxes, labels) are visible. Buttons do not visually react to clicking them when component is layered within another one.
hitTest not changed
buttons not recreated - but I’ll triplecheck that, tx for the hint.
multiple layers of components indeed. If I place the problematic component in the main app component it works fine. If I put it within some other component (so multiple layers) my botton component reacts to nothing.
When I get back to that part of the code I’ll post putline of that code.
Just adding one note, if you have Components, that you don’t want to interact with / don’t care, you can set setInterceptMouseClicks (false, false). Then mouse events will just go through them to the ones behind…
Found what happened; pretty elementary a series of (button) components that didn’t have a proper size. When testing in main component I place the object containing the buttons at (0,0) - within a child component they’d have a different location an screwed up. Shoulda known better.