Forums > MaxMSP

dynamic menubar?

Feb 20 2011 | 8:37 pm


is there a way to dynamically modify the script for a [menubar] object (on MacOS10.6, Max5.1.5)? I’d like to dynamically add/remove menuitems, however, I can’t figure a way to do this. There’s an ‘append’ message for appending to an existing script, but how can I remove things again?
-> alternatively, this could be handled if there would be a way to create the script outside of the menubar object and then simply replace the entire script(s)?

any help greatly appreciated!


Sep 02 2013 | 1:25 am

Wondered if anyone figured out a way to do this – I really could use this.
I can "append" an item to a menutitle by passing a message to [menubar]. The documentation, btw, says this is an internal script command, but it works as an external, dynamic message. It also ignores the (required) item number parameter you give it. But there is no way to remove items. If you hit it more than once than it just keeps adding more of the same to the end of the menu.

Sep 02 2013 | 1:30 am

Interesting, you can "cycle" a toggle for the [menubar] off-then-on-again and when it comes back on, the appended items are cleared. So if you do want a "dynamic" menu you can just re-build it every time you want to alter it…

Sep 08 2013 | 6:23 am

But, it still remans in the "menubar script"… :-/
There really should exist the possibility to do that in a clean way!

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP