Keypress dismisses active popupmenu (OSX only)

We use code from 05_04_2011 and popupmenus seem to dismiss themselves whenever i press a key (arrow key for instance to move through the options in the menu).
This happens in the Jucer (colour picker) and also in our own app, i checked the diffs till now but couldn’t find if something might have changed and/or fixed. And because i couldn’t build the latest tip (check my post about CTRunGetAdvances) i can’t check wether the problem still persists.
Did you remember changing anything regarding this the last few weeks?

Nope, works fine for me!

Hi Jules,
In the other thread a posted a solution for getting the latest tip to build with the 10.5 sdk running on a 10.5 system.
Finally got it to build and i still have the PopupMenus dismissing themselves. It might be that problem only arises with the 10.5 sdk.
Do you have a machine running 10.5 and would you be willing to give this a test. I tried debugging this but is so deep into Juce that i have no clue where to start looking.
And note that is happens just freshly out of the box running the Jucer just retreived from the Git repos.


Try running the precompiled juce demo and see if that works ok. I suspect that it’s your build process that’s broken, not the library.

I downloaded the IntroJucer (listed directly on the SourceForge page) but that crashes when creating a project. So you might want to have a look at this.
I got the JuceDemo from the 1_52 folder, but really that’s code from the past so in no way comparable to the current version in the tip.
But that crashes already at startup. So both apps crash on startup and not only on my machine but on the one of my colleague as well.
We are both running 10.5.8, so i would really appreciate it you could try to run these binaries yourself on a machine running 10.5.8.

Note, i’ve been developing with Juce for years already and this is my first major problem i can’t seem to get fixed myself, so help would be greatly appreciated.
Maybe someone else on this forum (running 10.5.8) could take the time to run the JuceDemo or IntroJucer from the SourceForge pages and see what happens, so i don’t feel like i’m alone in this.

Update, popupmenu is also dimissed when building with Snow Leopard using Xcode 3.2.6.

Follow these steps:
Open 'The Jucer’
Create New Component
Go to Graphics tab
Open Colour dialog
Go to Red color field and start typing in a value…
PopupMenu dismiss itself automagically…

I’ve really no idea what’s going on with those crashing problems, and I’m afraid I don’t have a machine I can run 10.5 on at the moment. Have you caught any such crashes in the debugger?

As for the keyboard dismissal thing in the jucer, it’s just a minor glitch due to the colour selector not grabbing key focus when used inside a menu. I’ll sort it out.

I've really no idea what's going on with those crashing problems, and I'm afraid I don't have a machine I can run 10.5 on at the moment. Have you caught any such crashes in the debugger?

No i haven’t, my own compiled version of the JuceDemo doesn’t have this problem.

It’s not only the colour selector but alos the popupmenu on the workspace in the ‘Component’ tab, the one that allows you to add buttons etc.

Thanks, I’ll have a look.

I found the cause of the problem.
I tried the JuceDemo and it’s popups don’t get dismissed untill i switched to ‘Use the native OSX menu bar’.
When the Native Menu bar is shown popups get dismissed when pressing a key.

Could you have a look and see please, i found the cause maybe you can find the solution?

Thanks, I already had a fix, will check something in soon.

I found your fix, thanx for that.
Although i must say it was quite some work to get you to have a look at it. Your first post said ‘Nope, works fine for me!’, and that’s not the answer i expected and i don’t think it sounds very professional.
Anyway i would like to thank your for the fix, but i would like to be taken a bit more seriously next time.

I don’t charge for support, and I fixed your bug within 24 hours. It was actually quite a lot of trouble - it took me at least 3 hours to track down the problem. If that’s not professional enough, please accept my humblest apologies!

First of all i want to make clear it’s not about the quality or speed in which you work, i think your work is great. And in this particular case i wouldn’t have mind if you take more than a week to fix it. My point is that it sometimes seems hard to get through to you, you just ignored by initial post by saying ‘nope, it works for me’ although it was obvious after all it wasn’t working, neither for you, me or anyone else. I’m not posting just because the fun of it, it’s my job.

I don’t mean to be picky but it really wasn’t my bug you fixed, it was your own. New code introduced this bug, before updating to the latest tip all was working fine.
The fact that it took you at least 3 hours to fix it just clearly points out that is was an intricate bug what would have taken me days to find. That’s why i asked for your help, if i found a problem and i know i can fix it i will do it and post it on the forums like i did in the past.

Anyway, no hard feelings i hope.
Btw did you find someone else to test the precompiled IntroJucer and JuceDemo (in 1_52 folder) on 10.5, it’s a shame if people download the demo and it crashes. I just tested both apps on 10.6 and that’s working fine.

Fair point!

No, haven’t found any 10.5 machines to try. I’m actually planning on doing a new release very soon, so will have a new binary up there anyway.