PopupMenu steals keyboard input in AU plugins

Hi,

I’ve found some bug which can be reproduced when we modify JuceDemoPlugin a little.

The text editor in which we can edit the slider’s value works properly until you open some PopupMenu. After that it behaves like it received the focus but it doesn’t respond to keyboard.

But when you close the plugin’s editor and reopen it, then text editor become responsive until you show PopupMenu again.

It happens only with AU plugin, VST works well on both Mac and PC.

Do you have any ideas what can cause this bug?

It seems like showing a component attached to the Desktop (like PopupMenu) make some mess with keyboard handling.

(tested on latest juce tip, MacOSX 10.6.1, LogicPro9, Live 8.0.5)

Cheers,
Przemek

Sounds like the same focus issue that friscokid posted yesterday:
http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=4619

Indeed it seems to be exactly the same problem. Do you have any ideas how we could to deal with this?

Maybe there is some way in which we could force the focus to return properly eg. when PopuMenu is closed… just an idea.

Am a bit stumped for inspiration on this one…

Me too… I can’t find any way how to make it working. Using text editor component is crucial for my plugins and I can’t also imagine how should I avoid using PopupMenu. I tried several solutions even few quite old like my version of ModalTextEditor…

I’m not sure when it went wrong (it was working well on 1.46 for sure) … I guess something happened after changes described here http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=4457

What is happening when plugin’s editor is closed and opened again? Maybe it could be the solution - doing it explicitly after closing any Desktop attached component.

That’s my question: if everything gets repaired after closing and opening editor is it possible to do it in the background?

Cheers,
Przemek

I don’t know… it just needs the NSViews to behave correctly, but I don’t know why they’re not getting the correct callbacks when inside a host.

Problem solved, see this post:
http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?p=24594#24594

Thanks !!! Works like a charm. However I noticed crash under Tiger. I’m not sure if it’s caused by these changes, need to take a look on it. It’s posted here - http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?p=24659