That must have something to do with what you are doing after setting global MyDict with the data.
Where can one find the 'Is Dictionary empty' block?
As I said above, there isn't one. The isListEmpty block (in Lists blocks) should do it OK
After setting up the global MyDict, I only use the MyDict data (regardless of whether it's the first or second run of my application - i.e. the code is the same every time I run my application) to display the text of the UI elements in the appropriate language.
So, if the code doesn't change on any run of my application, i.e. it works the same, then I don't understand why it doesn't work on the first run of my application (when the text elements from my MyDict dictionary need to appear on the elements), and why it works on the second, third, etc. run of my application (when the text elements from my MyDict dictionary also need to appear on the elements)?
Since the code is the same, I thought that this error (that the texts do not appear on the first run, but only on the second run) might be due to a timing problem. No?
Did you move the code after the MyDict load into the new Initialization phase 2 procedure I mentioned earlier?
You will still have two places in the startup code where that would be called
- In Screen Initialize after seeing MyDict is ready
- In File 1.GotText after making MyDict ready
This can't work without the procedure and the two calls.
(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
Thank you all very much for your help!
I don't understand why the call_TinyDB1_ClearTag_tag_dictTranslator block is there?
For testing only, so you do not have restart the companion when testing a "first run"
I usually wrap loose blocks like that in procedure definitions to avoid a yellow error.
Then I apply a Do It to the block inside to run it.
When I try to do it in the 'set values do' block on the 'select list item list' block, I get the following error message:
What am I doing wrong?
You are trying to run a Do It on blocks that refer to local variables.
The local variables are long gone by the time you get to apply the Do It.
To debug code like this, you can add extra global variables with names like debug_values, and inside the local init, set global debug_values to local values, then have the other blocks in that scope refer to global debug_values.
This makes the guts of the procedure testable with Do It, at the expense of having extra wires and tubes hanging out of it. After you are finished with your Do It testing, you can close it up by reversing the global hookups and removing the global variable.