Text entry to audio plug-in woes

Hi,

I’m trying to get text entry to work in my JUCE based audio plug-in, but I’m having some difficulty with it - please can anyone help.

I can’t use TextEditor controls, as the text entry box needs to display over an OpenGL surface, so I’m wanting to make my own Component class, which will display the text in the correct place on the OpenGLComponent. The display of the text is fine, but now I’m trying to get it to accept keyboard input. I’ve tried putting in a lot of the code from the TextEditor class. I have called setWantsKeyboardFocus( true ); and I have JucePlugin_EditorRequiresKeyboardFocus set to 1. When I mouse click the control I get a focusGained call through and I’ve tried putting in the peer->textInputRequired call from TextEditor.

But, no matter what I try I never seem to get any calls to keyPressed coming through.

To try to figure out what I’d done wrong, I built JuceDemoPlugin, and added the line gainLabel.setEditable( true );. Now when I click on the gainLabel in the JuceDemoPlugin, it shows the text for the gainLabel as if I’m about to edit it, and the flashing caret, etc. But, although I see the focusGained call come through in the debugger, again, I never get any keyPressed calls.

I am using the latest tip (1.54.27), and am testing in Windows 7 in Ableton Live 8.

Please can anyone suggest what I’m doing wrong?

Thanks

Paul

I got something working in the end, so in case its ever helpful to someone else, I followed the idea suggested in

http://www.rawmaterialsoftware.com/viewtopic.php?f=8&t=6901&p=44191&hilit=texteditor#p44191

of getting my text edit boxes to create a separate modal window on the desktop to accept the input when they get focus, and then close down the modal window when they loose focus.

Seems to work for me in Windows and OSX (although I need to run a full compatibility test on it in different DAWs, etc).

Hope that helps someone.

Paul