Popup menu doesn't work properly

Good day. Problem is that I’m using SimpleListBox and SimpleListBoxModel. In model when user clicks item I show popup menu.
But what is intersted that menu is showed in Debug mode, but isn’t visible in Realese mode. Any ideas?

Also. If list isn’t enabled, but I changed numRow in model and invoked setRowHeight, than list’s children are enabled. :smiley:

That’s a very misleading topic title - the menus do work properly. I’d bet this is just an uninitialised variable in your code.

And it’s not possible for a child component to be enabled when one of its parents is disabled, so don’t see how the rows could possibly be enabled. Are you accidentally enabling the list? Or just drawing them incorrectly? You realise that being disabled doesn’t stop a component from getting mouse clicks, so you’d still have to deal with that yourself by checking isEnabled() in your event handler.

Ok. Sorry for misleading topic.
But I’m not clear with your post.
First, about popup menu. Debug works, Realese doesn’t. No changes in codes. What variable is uninitialized.
About second.

model = new MyListBoxModel();
addAndMakeVisible(list = new RestrictsList(model));
list->setOutlineColour (Colours::black.withAlpha (0.5f), 1);

After this code model receives itemClicks.

Popup menus work perfectly well in release mode. Normally when something is different in a release build, it’s because you’ve not initialised a variable. In debug mode the compiler fills uninitialised variables with cdcdcdcd to help spot mistakes, but in release it doesn’t.

And like I just explained, disabling a list doesn’t prevent mouse clicks from reaching it. The enablement is a property that’s there for your component to use in whatever way is appropriate - it doesn’t automatically stop the component getting events, because you might need them for some custom behaviour.

Thanks. Maybe you right with initializing.
About enabling, model doesn’t have accesses to list. How it could understand that list isn’t enabled. When list is disabled highlighting of items works.

Hmm… yes, I guess for the SimpleListBox you might be right: maybe the enablement checks should go in the base class. I’ll have a look…

Jules, thanks. There was problem with uninitialized variable. I forgot about small enable flag, which I added in model to deny posssibility of popup menu.