( here's the import for the app mcowcm.aia )
I was following a tutorial on how to make a social media app here is the video - https://youtu.be/MsNWTDIkI9w?si=gHYnNHvGCWGpmC1F
I followed it exactly and I had a problem when I was already using cloudDB1 so I switched it to cloudDB2 it worked but it was displaying the posts weirdly so I did some things with some other
block ( I deleted it so I don't remember what I did ) but after I load into the second screen where the social media part of the project is it gives me this error - (The operation select list item cannot accept the arguments: , [""], [1] Bad arguments to select list item) and it won't load the posts here are screenshots of the code
I think your code is gullible when it receives a value from CloudDB2.
It does not test if it a list.
If it is a list, it does not check if each item in that list is also a post (a list of 3 items.)
How do you know if some one else doing this tutorial made a mistake and left garbage under the tag AllPosts?
really ?
Try clearing your tag AllPosts and start again?
This post was flagged by the community and is temporarily hidden.
Your errors:
You needed an extra global variable to build the list of Elements for your ListViewer.
You were corrupting your list of All Posts.
You did not need a second CloudDb instance.
You missed the \n character building your ListView Elements.
You lacked bulletproofing processing your incoming tag/value pairs.
You lacked error catching for CloudDB.
Otherwise, it was okay.
I didn't code it myself I followed a tutorial and it works thank you for the help but when you create a new post the past posts that were there disappear and don't come back until you refresh the screen
I think i fixed it
No code, no comment.
mcowcm_1_1.aia (11.4 KB) this is the code everything works it just the listview is displaying wrong it's displaying like this
What should it look like?
It looks fine here.
I had to turn everything visible in Screen2 to enter new data.
When you get dictionary brackets {} in a ListView, that might be because you set the ListView to show MainText but you filled it with multipart Elements.
I don't see any problem in the code.
Since you are on iOS, I can't test your code on that platform.
Let's guess that iOS does not support dictionaries well in ListViews.
In that case, stick to the simplest ListView setting, where Elements are just simple text, and it's set to MainText Only in the Designer, and you don't use the Create Element block, but instead just build up multiline text Elements in a simple list of Elements.
Here is a simpler version, more likely to work in iOS:
mcowcm_1_1 (1).aia (11.4 KB)
P.S. doing another CloudDB Get inside the procedure that processes incoming CloudDB data is profligate and antsy. I would throttle that down by moving that block to a leisurely Clock Timer, maybe 5 seconds.
Alright ill try doing that but thank you this code worked that exact way I wanted it this helped a lot thank you