dynamically get umenu length

amun's icon

i've looked in the helpfiles and on the forums to no avail.
can anyone tell me how to dynamically get the number of items in a umenu object? thanks!

pm's icon

Simply send the message "count" to the umenu and you'll get it from the right outlet (Ex. : count 3).
When you build the content of a umenu with a folder, using "prefix thepathofthefolder", you automatically get the number of items in the folder from the right outlet ("populate 5").

Before asking questions, don't forget to have a look at the reference. Max 5 makes it so simple to access the reference (in the help file).