Structure

String to integer using javascript

Swiftlikeninja's picture

Okay I ran into an interesting scenario trying to sort through an xml feed. The Structure I have has a number of completes field and Im trying to get a leaderboard set up with the top completes displayed but the feed has the completes as a string and as such the structure sort sorts them alphabetically. Meaning that 10 would actually come before 2 which can cause some major issues in sorting. I found that if I use a number splitter off the complete index and rebuild the structure w/ the kineme structure maker then sorting works but the structure Im using can range to over 400 members so manually doing this is out of the question and i don't think iterator is the answer. Can anyone assist me in a javascript answer on how to change a substructure in an entire structure list from a string to an integer?

Or even simpler, tell me if Im missing something in the structure sort?

Structure > Outputs Patch

Here's an idea for an addition to a future Structure Tools: A patch that takes a structure as input, and creates an output port for itself of the appropriate type for each item in the structure.

a|x

Value Historian load .plist

It'd be nice to be able to load from a folder of .plist files as a structure of files. I guess this could require a new "plist" patch that outputs the structure of files, and an input on the Value Historian.

Right now I believe the only way to use multiple files is to create multiple Value Historian patches with different files loaded to each, then switch between them.

Structure with brackets and structure ( ) with quotation marks " "

akaioni's picture

Hello

I have a small problem that I cannot figure my way around, I am trying to send some numbers with Kineme's ArtDMX, it works well when the structure is supplied by one of Kineme's Structure Maker, but when I aim to get the structure from any of the Queue patches. The only difference between the two structures is that one has index number written in quotation marks and the others in brackets.

I am now wondering, is the root of the problem that ArtDMX does not want to digest the data because of brackets, how should I avoid it.

I'm posting the screen shots of the patch.

Structure subtlety

yanomano's picture

This is probably an idiotic question but, in a structure of structures, is there a way to retrieve the name of an index when the structure has been reordered ?

See the jpeg as example : The first index (0) is named "9" : how to retrieve this number/name ?

A method without javascript would be ideal because the work is done inside an iterator !

Thanks for the kind help !