TextEditor & PopupMenu

Hi Jules,

With the latest git tip (my first update in many months!), I find that when I build a program that uses PopupMenu items from a (sub-classed) TextEditor … through addPopupMenuItems and performPopupMenuAction; when I right-click on the TextEditor, the pop-up menu appears, but then immediately disappears before I can click on any of the items!!

Any ideas what might be behind this? Have only tried so far on the Mac; I want to figure-out a fix before I move to using this version of Juce on Windows…

Best,

Pete

This is also true for Juce Demo “out of the box” :shock:

Select Demo -> Fonts and Text
Right-Click in the TextEditor field on the right panel
… and try to select something from the PopupMenu :slight_smile:

Best wishes,

Pete

looks like this issue is similar to http://www.rawmaterialsoftware.com/viewtopic.php?f=2&t=5151&p=27846#p27846.

Aha, many thanks - I’ll link from that post to this one!

Best wishes, Pete

Hi,
I have similar behavior on my Mac.
I just simply create popup menu with

PopupMenu root;
root.addItem(1, T("test..."), true, false);
...
int result = root.show();
switch(result) {
case 1: ....

And then it is showing correctly, but closes as soon as I move the mouse over it.
And the result value is equal to 0.

Although it works normally on Windows.

Any ideas how to avoid this?

The popup menus have also stopped working in my VST plugin on Windows 7 (64 bit).

Ok,
I’ve made some investigations and seems that the
Process::isForegroundProcess() returns false for the current process and thats why the menu disappears.

However why it is returning false for the process that is currently in progress?

I have the same problem.
If I use showAt((Component*)editor) the menu doesn’t disapper but it’s not located where I click with mouse.

Sorry, I think this is just a small typo in the menu code. Will check something in later today that should sort it out…