I'm going to ask a specific question about Jens' recent project demo for the Robolot event where he implemented a simplified $1 gesture recognition system, but I suspect that the real trouble is that I don't understand something fundamental about how objects are passed around within Snap. Please know that I'm expecting the core problme to be my ignorance, and don't hesitate to point that out.
This is the video of Jens presentation.
In it, he captures the points of a single movement gesture as a list of list(xpos,ypos) elements. Great!
Then he creates a resample function that lerps those points and returns a new list of specified length. Great!
Then he captures that returned list into a new list (called examples) along with a label value. That's around 32:00 in the video above.
In his example, this creates two element entry in the list examples.
examples[1][A] is the list containing all of the points of the interpolated drawing.
examples [1][B] is a descriptive string for that drawing.
When I tried to recreate this later, I found that add(list( (resample of sketch)(name) )) created an element for every point of the interpolated sketch (from 1A to 1LLL) and a second entry for the label.
I don't know how to put my specific blocks in a forum post, and all I have of Jens' work is what's shown in the video.
I'm unsure wether this is an error in my handling of the sampled list, or of my understanding of lists, or just a weird display error.
In linking the project below, I noticed that the list looked fine on the project page. So I tried this.
Recreate the empty list:
Add the interpolated list and name to examples. It displays across the columns.
Save and reload the project page. List displays "neat" with 1A as a single list object.
Reopen project. List is neat and new entries also come in neat.
forgot to link the project:
--andrew