canModalEventBeSentToComponent


#1

another futile one, but I guess I may as well ask…

is there any way to get a component to be included in this canModalEventBeSentToComponent check WITHOUT subclassing? or maybe a flag to say ‘ignoreModalBlocking’ on the target component. i’m trying to make an acessibility widget but modal components get their inputAttemptWhenModal callback called when I click on it - in Label this causes the editor to disappear. Obviously I can subclass Label but it would be good to be able to have it automatically work for all components.

thinking about it, perhaps the best solution would be to have a special Component subclass for this purpose - AccessibilityComponent perhaps; before testing ‘canModalEventBeSentToComponent’, it could do a dynamic cast check on the component - if it’s an AccessibilityComponent, it will allow the event. What do you think?


#2

hmm, I see where you’re coming from with that. Don’t like the idea of a special case for an AccessibiltyComp though. Maybe there could be a flag in all components that indicates whether the component should always be allowed to receive events in this way. That’d be quite cheap to implement.


#3

yeah, that’s what I first thought, then I imagined that you might not want to add another flag to Component :slight_smile: just covering all bases really.