Send string array action message

I’d like to send an action message containing a StringArray instead of just a String.

Is there a simple way to do this? I’m thinking I maybe could create a subclass of StringArray which inherits from Message, but maybe there’s a more elegant way.


Argh… no, don’t do that!

StringArray provides a means of concatenating its contents into a single String, and the inverse.

Check out StringArray::joinIntoString and the two versions of StringArray::fromTokens.

If that doesn’t work for you, I suggest freestanding utility functions to go from/to a StringArray and back to whatever you need.

1 Like

That is exactly the kind of solution I was after. You saved me tonne of time. Big thanks!

You could also send a custom Message or CallbackMessage object that contains a StringArray. But no, you should NEVER inherit from a class like StringArray!

1 Like