-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS ListView does not accept dictionaries via blocks #3149
Comments
I've looked through the code and I don't see a reason why it doesn't work. It seems to me that the dictionary is not correctly recognized in the object. Is it possible? |
Not sure. We will probably need to step through the code to understand why that particular path isn't taken. |
The ListData function that is called when we set dictionary data in the designer works correctly. So the _listData variable has a valid dictionary which is loaded into the view using _view.reloadData(). So everything that happens after calling _view.reloadData() works correctly. So in my opinion the problem is somewhere in the function that processes the input data, for dictionaries it is the Elements function. This is the part of the code responsible for processing the input data, placing it in the appropriate variable and loading it into the view. If _listData had a valid dictionary, using _view.reloadData() should load the correct data into the view, just like ListData does. But it's not like that.
So let's dig deeper into the code above:
It seems to me that this condition is not met, even though the data is loaded as a dictionary, both using the CreateElement function and using dictionary blocks to create the appropriate dictionary structure.
So this code is executed and the data is loaded as a string:
I don't see any error in the above code. This is a screenshot from an iPhone showing the bug discussed in this report. Why is the dictionary represented by {key = value} and not {key : value} ? Does the dictionary in iOS have this format, or is it the result of this command:
|
Describe the bug
From the forum: Setting complex data for the list items works via the designer, but adding the result of CreateElement to a ListView in the blocks causes the element to appear as a JSON dictionary instead.
Affects
Expected behavior
Adding an element from the blocks should have the same effect as setting the data via the ListData property in the designer.
Steps to reproduce
The text was updated successfully, but these errors were encountered: