I have just discovered that if I store the index of the vertical arrangement in tiny db and in another moment get the value and use in this block, I get the mentioned error
On the other hand If I make a simple list storing the intex of the vertical arrangements:
But, as said, I can't store the vertical arrangement's indexes in Tiny DB.
Maybe this is related with the fact that storing in DB the data is converted in a string. So the question is to know what kind of data is spected in "COMPONENT" parámeter in this block,
Thanks Meritcat @TIMAI2 , finally you have explained really well. I didn't understand what other users say to me...
I have no words to thank you for your help. I have wasted a lot of Sunday's hours.
Your solution is really simple and smart: only storing the index of the visible arragement in TinyDB
In any case, I'm curious why storing the list of arrays in a list located in the database didn't work.
However, I am somewhat annoyed with the inflexibility of appinventor: It is true that my level of programming is very basic, but I usually solve problems by writing pseudocode that I later have a hard time bringing to APP INVENTOR because I feel that it has some absurd limitations that lead me to problems whose solution are "video game cheats".
Components like vertical arrangements are created at runtime, when the app initialises, and each component is given a unique name. This unique name can be used in that session of the app, but next time you run the app the components are initialised again with new unique names. Therefore if you attempt to store one of these unique names in a tinydb, it will not exist in the app the next time you run it.
Also, you cannot store strings of component names and expect them to return a component.
I understand what you're saying, but not completely:
In my last trials, what I have saved in the database, is the same that you done in "vaList" : the content of the block of the arrangement that gave me its block as a result: something like "com.google.appinventor.components.runtime.VerticalArrangement@ xxxxxx"
Where xxxx is what changes at every arrangement. So, theorically it should work, becasuse I stored, as you, the unique session name in a list every time the screen initializes
Maybe when it is stored in TinyDB the coding change to a text (string) or something like that (maybe xxxxx is hexadecimal)
Kind regards and I'll read you tomorrow, I go to bed