Popup fun

Hi there!
I’m getting a strange behaviour with the latest tip (screenshot attached).
What I’m doing is just creating the popup in the mouseUp of my component.
And after that loads of popups get created if I move the mouse.
Tested on mac only at the moment.

That’s not a bug, that’s a feature!

It’s a nice effect! No idea what’s happening, but surely the (presumably very long!) stack trace will shed some light…

Yes of course! But today I’m working on another project, as soon as I have some time I’ll get to it.

i had something similar happen to me, i overloaded the listItemDoubleClicked for a list box and in that event i was showing an alert window via enterModalState(), and i was getting assertions from juce in the createWindow method, so i switched to DialogWindow, but then the same thing happen what we see above, i got like hundreds of dialog windows opened on a single double click (though i noticed that the double click was repeated automaticly, so it wasn’t the DialogWindow that was spawning itself it was the listbox that was generating doubleclick events more then it should.

Well, It was working fine before the changes related to this post
http://www.rawmaterialsoftware.com/viewtopic.php?f=4&t=7487

Can you suggest some code I could use to reproduce it?

Finally some free time :smiley:

In the juce demo, inside Widgets.cpp just add this to the DemoTabbedComponent class:

void mouseUp(const MouseEvent& e) { PopupMenu m; m.addItem (1, "I like it", true, false); m.addItem (2, "when I float", true, false); m.addItem (3, "around", true, false); m.show(); }

If you do the same in a mouseDown call it works fine.

Thanks! I’ve sorted that out now - try the latest version.