setting the items of LemurMenu not working?

Discuss Lemur and share techniques.
Post Reply
misal
Newbie
Posts: 11
Joined: 08 Dec 2011 21:35

setting the items of LemurMenu not working?

Post by misal »

i tried to set the content of a LemurMenu as follows:

Code: Select all

setattribute(Menu, 'content', {'asdf', 'asdf', 'fads', 'asdf'});
but nothing happens...
am i doing something wrong?
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: setting the items of LemurMenu not working?

Post by Macciza »

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
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
misal
Newbie
Posts: 11
Joined: 08 Dec 2011 21:35

Re: setting the items of LemurMenu not working?

Post by misal »

Thank you. Now it works!
Xenophile
Newbie
Posts: 13
Joined: 08 Feb 2012 20:58

Re: setting the items of LemurMenu not working?

Post by Xenophile »

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.
Post Reply