Page 1 of 1

ruby selector/droplist?

Posted: Sat Jul 20, 2013 11:04 pm
by Nubeat7
hi all, i`m fiddling around with the new droplist in ruby, and got a selector working but for check and show the actual item i did an array via split(',') from the items list and used this array also for the count to make 0..1 index for the preset (which is required for automation as vst) so my question is, is there a direct access to the droplist to get those parameters?

i also don`t really like the split(',')methode to do the array because the item list could also be a text array and then this methode dont work anymore...

some ideas?

Re: ruby selector/droplist?

Posted: Sun Jul 21, 2013 12:21 am
by MyCo
There is no other way to access the droplist, because the droplist only exists between a call to createDropList and the dropListFinished callback. So if the droplist isn't visible, it doesn't exist.

For your other question: I would use a "string array" type as input to the Ruby Edit (because most of the time you want to access the items by key). And when you open the droplist, call "join" on the array. But the problem will still exist. You can't have a comma in an item name.

Re: ruby selector/droplist?

Posted: Sun Jul 21, 2013 9:12 pm
by Nubeat7
thanks myco, the fact that the droplist only exists while call give me the answer to my other question, why it do not update the output when set index from outside...