Array of var


#1

I’ve noticed a new neat class called “var”.

Is it ok to create an Array ? I think it could be used for a messaging system where the first var in the Array would be a String with the command, and the remaining var’s would be the parameters, which would differ depending on the first String parameter.


#2

I wouldn’t describe it as “new”! Must be a couple of years old by now!

Yes, it’s totally ok to use an Array, but a var can also be used to contain an array of vars, so that might also be useful to you.

And if you’re new to that class, have you seen the other good stuff like Value, ValueTree, NamedValueSet, etc?


#3

Oh, ok, I only noticed it because the drag’n’drop functions now use it (SourceDetails class). I’ll have a look at these classes.


#4

Does anyone know of any simple source code examples that highlight the power of the “other good stuff”?


#5

The Introjucer.