ruby selector/droplist?

Post any examples or modules that you want to share here
Post Reply
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

ruby selector/droplist?

Post 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?
Attachments
selector ruby droplist.fsm
(1.54 KiB) Downloaded 1393 times
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: ruby selector/droplist?

Post 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.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: ruby selector/droplist?

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