Hello,
I've labored the day of yesterday to get something rather simple to work, to display in a listbox, in a sorted manner, names stored in a webstore, and have a text entry field, add and remove button, to add and remove names in the list.
It turns out to be complex due to a number of reasons:
1. Only array supports a sort method. Without array I would need to program the sort.
2. Array always starts with at least one "zero" element (dimension 1,1,1), which show up in the list, when transfering values from the array to the list
3. webstore can only be conveniently loaded via json to a dictionary, so if i want it sorted, i have to transfer the dictionary to an array
4. to delete selection items in a list from the webstore its necessary to either keep track of the key of each item in the list, or to use the name of the item in the list as ke
5. there is a need to use loops extensively but there is no event that indicates when a loop completed, in order to continue the next step in processing
All in all, a surprising difficult task to program
Here are some suggestions to simplify this, perhaps Ashley might find some of interest:
1. Ideally, like in other modern GUI environments, there could be a binding between elements in one list, such as the visual list and another list, such as elements in a web store
2. alternatively, there could be a sort function on the Dictionary, treating the dictionary keys, like an array, as if it had some order, since the for loop, iterates through some predefined order
3. having a for (sorted) that does the sorting for the dictionary, by key or value
4. support a generic "asjson" that supports loading keys or values from a dictionary into another elements via json (e.g. from dictionary to array, from array to list). Currently there are limits on loading json from one element to another
re: 4, here is one way the task could be accomplished with Json:
1. Load json string of webstore items into an array
2. sort the array
3. load json string of the array into the list
thanks,
Dan