General
setting the items of LemurMenu not working?
Started by misal on .
Sign in or create an account to join the conversation.
i tried to set the content of a LemurMenu as follows:
am i doing something wrong?
setattribute(Menu, 'content', {'asdf', 'asdf', 'fads', 'asdf'});
but nothing happens...am i doing something wrong?
High
I think there may be an error in the manual (if you were using that for reference)
Whilst the LemurMenu page lists 'content' as the attribute it's actually 'items'
So the scripting would be - setattribute(Menu, 'items', {'opt1', 'opt2'});
And sent via OSC it is - /Menu @items Opt1 Opt2
There is a handy internal function called 'getattributelist' that can report an objects attributes . . .
Cheers
MM
I think there may be an error in the manual (if you were using that for reference)
Whilst the LemurMenu page lists 'content' as the attribute it's actually 'items'
So the scripting would be - setattribute(Menu, 'items', {'opt1', 'opt2'});
And sent via OSC it is - /Menu @items Opt1 Opt2
There is a handy internal function called 'getattributelist' that can report an objects attributes . . .
Cheers
MM
Thank you. Now it works!
The manual does indeed have an error. I spent about half an hour puzzling over this last night. A search of the forums turned up an example of the correct attribute name, "items." Kind of frustrating when you dutifully RTFM, but get the wrong answers there.