List is not a list after saving

that seems to help, next piece of the same puzzle

Do you have ShowListsAsJson unticked for a reason ?

i do not. ill tick it now

You are not doing anything with global temp, other than probably checking its contents at the wrong time.

Do we assume you are not getting anything in your list global NameIndex either ?

global temp is just there to provide a window into the passing of data
it seems to show that the ITEM is an empty string while the length of list is 2
Global temp should update 2 times and the last would be visible after the fact

each of the lists starts with NAME

global nameIndex would become a list of the names only for indexing the dictionaries

It remains an empty list

I have emulated your procedure, works for me:

This can be done by Dictionary walk key path block.

I am setting up a new monitor I will be back shortly and give this a try. I do not understand the concept of walking key path yet.

43" samsung smart monitor, I hope its smarter than me :stuck_out_tongue:

This can be done without using dictionaries at all :wink:

bigger monitor done... cant hurt. helps with the zoom issue at least a little

back to work.
@TIMAI2 thank you . I'm going to work on that now

while I still need to know how I'm wrecking this particular train, I'm not opposed to starting over with my entire app to apply some better best practices.

I introduced dictionaries as a matter of efficiency, but i think i can probably manage without. either way the above issue will eventually resurface if I don't understand it. I have studied it. I cant see that there is a reason for the issue.

I will add to this that I had an error that dragging could not accept the arguments. I disable the dragging block to debug. I got the same error even though the blocks were disabled. I then deleted and still got error.

after that I haven't been able to get the app to initialize due to this current bug.

I'm thinking I have something hung up having worked with this app through so many revisions

FloorUploaded.aia (402.0 KB)

In the grand scope of things, this is a lot of data for me, but not for AI2.
I opted for dictionaries to avoid having a stack of global variables, and possibly I'm intimidated by a more complex structure, although I have no real reason to be.

I do want to preserve my ability to see and touch my data, so I'm shying away from tinyDB for persistence.

The data set is surely not too big to juggle in RAM (assuming that's where is at as a global variable)
I can pass the contents of TextBoxes directly into the list without keys. the app has to juggle, not me, so I don't know why I have a hesitation to just make a long list. Ultimately that is what they keys wind up doing anyway.

anything you would warn me about, or point me to?

I took a peek at your code, and this can't work, because you never decode the responseContent, thus treating raw text like lists:

P.S. There is a lookup in pairs block for lists, equivalent to dictionary lookup.

Thank you for taking the time to look!

what I was attempting to do it treat everything in the list as the objects and texts that they are as the list will accept any (I think) and encode the bundle of lists (list of list) OBJECT into text using the web JSON functions. 1 encode on write and 1 decode on read, but I wasn't allowing time to write before beginning to read and so I was reading only what had already been written, not the entire string

when I'm reading text, isn't the text in the FORM of a list, but not an object?
the middle part of that works. the JSON string from my device has never been an issue to import. it looks like the failure to pause was the bigger part of my underlying issue, but lots of contributions.

I'm new at this and I'm working hard to curb bad habits and learn good ones

after abandoning and starting over I see some things to do better for sure.
I didn't abandon by choice. i had several instances of the blocks look right but didnt produce expected results. maybe the backend of my app is corrupt? maybe I am just that bad at AI2

I was TOTALLY unaware of when things should be encoded or why, but @TIMAI2 got me on the right track with that.

I am starting over without dictionaries, and hopefully encoding and decoding properly

this is what I'm trying now





This is not just about dictionaries, but also about lists.

Both have internal representations that respond to blocks like 'select item from list' that don't work on the external representations.

I can't show you the internal representations without a hex dump of RAM.

A book on data structures would give you an idea on the internal structure.

Operationally, a responseContent from a Web request is going to arrive as text.
If it is the external representation of a structure, it needs to pass thru the web block DecodeJSONAsDictionary to creat an internal structure that will respond to a list or dictionary block.

For that event block of yours, I used the Blocks Editor browser extension set to FIND the global variable that received the responseContent, and it got fed immediately into SELECT list blocks without the required decode.

in my frustration i tried many many variations. i understand the concept you are relaying. im also saying that while it might not be a good practice AI2 accepts a lot of gray area and makes it work. I dont know how to tell if its magic or behind the scenes fixing. Only positive experience will help me learn the difference and i am listening.

Ive done a few small projects over the last 5 years but most of those years i was absent. I just dont have a lot of experience.

your explanation is great, but the information you gave me probably involves a month of reading to fully understand. I am grateful. Its gonna take a minute for me to grasp the depth of what you are saying and try to apply it to my situation.

If you ever need you air conditioner repaired, I'm your guy. I can give you volumes of information in jargon and technical terms that are difficult to pronounce and references that are dynamic and dependent on all kinds of environmental variables.

slow down a little bit. I'm sitting at my desk 12 hours a day working at this.... but you got a 30 year head start on me(guessing!)

I have regularly taken the time to read the links you provide, and i try to take away some new knowledge from each one, even if its not what i was looking for or hoping for

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.