Modal and popup TextEditor

Hi Jules,

I use TextEditor in order to have a value popup editing for knob when you double click on it.

Works fine.
So far I am adding this TextEditor on the top level component so I can’t place it where I want and moreover the size I want.
Usually the TextEditor can be bigger than the knob itself.

My problem is when I have one of this knob in a modal component.
If I double click this knob, then the TextEditor do not receive any key events.

What would be the good way to solve this problem ?

I though that I could check for getCurrentlyModalComponent and add the TextEditor to it instead of the top level component, but what happens if my modal component is smaller than the TextEditor.

Thanks.

Are you using the latest tip? I was doing something similar last week in the new jucer, and ironed-out a couple of places where modal-in-modal components could cause problems.

I got something from the 13th of January so I will check with the latest one.

The thing is that the popup TextEditor itself is not modal.

Thanks,

Ah, well for it to get any keypresses, it’d need to either be modal itself, or to be inside the currently-modal component.

The latest tip do not change anything.

Will check if I can make it modal.

thanks,

Oh, I’ve had the same issue myself.
You probably want to have a look to Component::canModalEventBeSentToComponent().

Basically, you can give your text editor a specific name, or give the text editor reference to the knob, and overload the “can…Component” method to return true for the text editor.