Menu parameter display not updating when changed from callback

Hi all,

We are having an issue with a discrepancy between the displayed value of custom menu parameters and their actual value when changing the parameter from a callback in Python.

Here’s a small example patch:

menu_display_bug.toe (4.0 KB)

What we are trying to do here is to pulse the “Next Menu Item” button and have the Menu parameter step through it’s items incrementally.

If we do this using a parexecDAT, we see the value changing in the parCHOP (or when queried via Python) but the displayed value on the component stays the same. By contrast, if we manually ctrl+R run the same two lines of code but from a textDAT (or do it from the Textport), the value changes AND the display also updates.

This issue is currently happening on Windows 10, build 15800, but it occurred on previous builds as well.

One other note that might be relevant - I think this bug was introduced after we reported a different issue directly to Markus (about 1.5 years ago I believe), which was that when incrementing the menu value via callback, the OnValueChanged() callback for the menu parameter would fire multiple times instead of just once.

Thanks for your help :slight_smile:

Jonas
WV

Hey @Whitevoid

This issue is fixed in Experimental builds.

They were quite some changes / refactor around menu parameters and those were not brought to latest 10k.

Would that workaround do it for you?

def onPulse(par):
	run(
		"op('base1').par.Menu = (op('base1').par.Menu.menuIndex + 1) % len(op('base1').par.Menu.menuNames)",
		op('base1'),
		endFrame=True,
		delayRef=op.TDResources
	)

Let us know,

Thanks,
Michel

Hey Michel,

thanks for the quick reply and workaround suggestion. It works for the example I’ve provided, but unfortunately not in the actual patch where we need this fix. I’ve tried to extend my example so it uses the same extension class structure / inheritances / chain of callbacks as in our real-world application, but even then your suggestion works only in the isolated example file. I will need to do some more investigating.

Thank you!
Jonas

Edit: Forgot to add - yes I can confirm that this issue does not occur in the latest experimental build (39010).