Was using [text get] to fill an array and I noticed that if you fill the array at [array define]'s left inlet, it will miss the first value if the first value is zero, works fine if using [array set] or if the first value is not a zero. Am I missing something or is this a bug? Using 50.2 vanilla.
-
Array and Text weirdness
-
@oid it seems like the first value that you send to [array define], works like the second inlet of [array set], it defines the field number of the first value. I think it is not a documented feature.
-
@Jona, that is what I originally thought as well, but as I said, this behaviour only happens when the first value is a zero, change that first value to a non-zero number and it works just like the [text get] method. Probably should have shown that in my patch as well.
-
Actually, it does act to set the start field, but not always it seems, have to figure out what is going on in my rather complex patch to figure what is going on there.
-
Got it worked out, turns out index0 was left over from the previous fill and just happened to be a 1 and the first value in the new data was also a 1, so it looked like it worked. This is actually a very handy feature for my current project. Thanks for the help folks.
-
@oid And it can be used together with [s arrayname]
-
@ingox Ah! So sending to an array name just sends to the [array define] for that array, you can send any of the messages that [array define] accepts. That is very handy and has made my patch much neater. Thanks for the heads up on that.