I'm looking to create a structure or class to create a variable with several parameters.
For example :
struct MyStruct {
int value: 0
string text: "My text"
bool verif: false
}
or
class MyClass {
int value: 0
string text: "My text"
bool verif: false
}
label1.text = MyStruct.text OR label1.text = MyClass.text MyStruct.verif = true OR MyClass.verif = true
With lists, I don't have the names of the values. Just the index numbers.
As for the dictionary, I don't like using the "Not found" variable all the time.
If anyone has another solution, I'd be very grateful.
This is not practical for reading a simple value or writing a value.
A loop to read or write a value is not very optimised.
All these blocks seem too complicated and overload the code.
There is no such option in AppInventor. You can use Java and AndroidStudio. You can also add such a function in the open source AppInventor. AppInventor will provide the usual global and local variables, dictionaries and lists.
If you want to create a thousand instances of such dictionaries, of course there will be a lot of blocks and they will burden the project, but this means that there is something wrong with your code.
I found this solution.
A global variable comprising 3 different variables (Int, String and Boolean)
3 Get and Set procedures and a global procedure.
That's not bad, is it ?