Runtime Error - undefined variable. Irritants: (yail/yail-dictionary) when using Control

When I use "for each key with value in dictionary", it gives me this runtime error - undefined variable. Irritants:(yail/yail-dictionary). Did I do it wrong? Please help!

There is nothing in your dictionary

I loaded item in list to dictionary and I am able to see value of keys in dictionary if I search them.

What is in name.Text? Give an example.

box "name.Text" is where I enter a string like "I love cat". When the Save button is clicked, it will put this string to list and in turn put it in dictionary with value of 1 for each word "I", "love", "cat". It is my first program in App inventor and it is fun to learn.

Works OK with Android

Could be an iOS issue....

that for each key with value in dictionary block does not appear in the list:


unless it is the for_each_dict....

Yes, I use iOS.

Break it down and use Do It to find out where it breaks:

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

I try to pull key/value pair from dictionary. It breaks when I use "for each key with value in dictionary" control. I only display simple text "hello" but it still breaks.

Thanks so much for "Do it" tip! It looks like there is nothing in dictionary. I look at the code "set value for key - get item", it looks like it does not know item from the list.

There won't be anything until after the blocks have run. Check the value of `dictionary after you press the button.

It gives error.

as I said, seems like that for each block is broken for iOS. here is one workaround for this simple example


Thank you for your help today! Greatly appreciated!