Page 1 of 1

SelectInterface() by name?

Posted: 23 Aug 2012 15:42
by ForestCat
I have an "index" page of buttons which are used to select interface pages, and there are a lot of them. I would prefer to give my interfaces meaningful names, i.e. VolFaders, TransCtrl, etc, so when I need to modify something, it's easy to find in nice alphabetical order in the Project pane. All well and good until I need to add a new interface, and that screws up everything on my index button page, since SelectInterface(4) doesn't point to the same interface if the new one happens to fall before it in the alphabet sort. Yes, I know I can prefix my meaningful interface names with 000, 001, 002, etc., but that looks like crap on the tabs, and is pretty crude by 2012 programming conventions. Why can't SelectInterface() work with the literal interface name? How can I add new interfaces without screwing up my index page?

Re: SelectInterface() by name?

Posted: 24 Aug 2012 08:14
by axel_liine
Hi,
Indeed, SelectInterface only accepts numerical values at the time. Adding support for interface names as arguments sounds like a good idea, we're adding this to the wishlist and will let you know when it's available.

Re: SelectInterface() by name?

Posted: 24 Aug 2012 11:51
by ForestCat
Cool. It would be very useful w/ SelectTab() for the same reasons.

Re: SelectInterface() by name?

Posted: 24 Aug 2012 15:30
by Macciza
One option might be to set up expression that map the names you want to numbers to use as the index
Or alternately to give each interface an independent 'interface' variable which you would set as you add more interfaces . . .
Hope that helps . . .