Forums > Javascript

invalid path in LiveAPI

May 14, 2013 | 7:21 am

Help needed!

Stored the paths of certain tracks in an array:

tracks_path_array.push(theTracks.path);

It works. Iterating through the this shows: "live_set tracks 0" or  "live_set tracks 5"

But reusing it like:

var thisTrack = newLiveAPI(tracks_path_array[x]);

doesn´t work. "invalid path"


May 14, 2013 | 10:01 am

Found the solution:

String replied by the aray must be sliced, to remove  the question marks!


May 14, 2013 | 11:38 am

Sorry, not question marks, quotation marks!


May 15, 2013 | 12:38 pm

yeah, this business about some strings having extra quotation marks in is non obvious. same with the difference between getting a single number and an array of numbers. you can debug this kind of weird behaviour by not relying on the flakey post messages that Max produced by default, but by using, e.g. a "pretty printer" function that makes the types of all variables clear. I use one from Stack overflow.


Viewing 4 posts - 1 through 4 (of 4 total)