How to 'reset' umenu?

Martin Schmid's icon

Perhaps this is a more general question about resetting state of a script...

When first creating a umenu object, it is empty ( as on the left).. .however, once I bang it, it is populated (as on the right). Curious if there is a way to 'reset' the state of the script so that it is empty again...

TIA

Rivanni's icon

Send the message

clear

to the umenu.

Why not explore the umenu help file?

Martin Schmid's icon

ah, yes, thanks @rivanni...

I'm still wrapping my head around this way of thinking of the state of objects being maintained during creation/editing/debugging, and still learning the documentation conventions, etc... my first foray into such a scripting language/environment.

Just happened into some of the tutorials w/ LCD which had a 'clear' example.. so the dots are starting to connect.

Roman Thilenius's icon

for the first overview the help file, for the full documentation the reference (in-app or online)

most objects which allow a "set hello" message will can be reset using "set" (aka set nothing), most others use "clear", but there are exceptions.