Seeker.aia (1.7 MB)
The problem is on the 'main screen' screen
I'm just getting started to review your blocks, which you collapsed a lot.
There is a problem where you enter MainScreen from Screen1, with the start value.
You rashly expect the start value to be a list.
But Screen1 doesn't always pass a list:
Also, while reading I encountered this sloppiness:
The item to add should have been a list, not a text JOIN, to separate the items.
Also, Clock1.Now() is an Instant, which is unreadable without formatting and does not survive storage.
For the other readers on the board, and for further analysis, here are readable block downloads:
Screen1:
MainScreen:
This validation procedure in Screen1 contains illogical clauses:
There are places where you check the logical AND of comparing the same value against blank or '<null>'.
A field can't ever have two different values at the same time, so all those clauses are doomed to return 'false'.
I don't see a single place in your code where you use procedure parameters and common procedures to reduce your code footprint. You also have duplicated code for different subject areas.
Don't rubber stamp your mistakes, it makes for more work later cleaning them up.
Got it.
Here's your insert into a list block, where you are telling it the incoming CloudDB tag is the list it should insert into.
But CloudDB tags can only be simple pieces of text, so they can never support a list insert.
Tidied up Project export, no corrections:
Seeker (1).aia (1.7 MB)
Do you know how I would be able to get clock to survive storage? I'd like for me to have the time that the thing is added, if there is no possible way let me know.
Also for the check I don't quite understand what you mean. I'm checking the text boxes to see if they're empty. If they're using an android it would simply be blank, hence why I'm checking for a blank box, and if they're both empty I want to be able to tell them they're both empty, hence the AND for the password box and the username box. If they're using IOS it's supposed to return '' which is why I added that. I'll try to condense my code as well.
For the cloud db should I use something else? Is there no way that I'd be able to use it the way I planned to?
The Clock component has a Milliseconds data type, which is a big number representing the number of milliseconds since 1970 (the birth of the unix family.)
That's the kind of format you want under the hood of your app, away from the need to look pretty but capable of doing math tricks like taking durations and measuring before/after.
The Clock component has lots of blocks for converting milliseconds to Instants, and formatting blocks to get date parts for external display.
The logical AND block is not as smart as the English language AND word.
English: You and I = smart
Logic: (You = smart) AND (I = smart)
Specifically wrong code:
The AND should be an OR
because the password can't be empty and null at the same time.
Would Clock.FormatTime work with Clock.now?
Were there any other problems with the way I was using CloudDB? I checked and got rid of all the parts (that I saw) that could have been storing a tag as a list but it's still giving me the error 'bad arguments to insert list item'.
I just fixed it. It didn't immediately give me an error this time. Hopefully that part is fixed.
I tried something else, I hit the home button without previously creating a post and it gave me a new error.
I didn't think I had anything saved under academics. Is that the problem? That nothing was there?
You seem to have trouble distinguishing the difference between the piece of text used as a CloudDB tag and the list that could be retrieved from CloudDB using that tag in a Get Value block.
Show your new blocks.
I think those are the ones that are affecting it, those are one of the things I changed.
If you need the new build it's here
Seeker (2).aia (1.7 MB)
If the blocks are still wrong, then what exactly is wrong about it so I can fix it?
When appending things with CloudDB it adds it to the end, this is my attempt to have the newest additions be at the top instead of the bottom. However, as long as it works without any bugs I'll be fine with those additions being at the end.
You seem to be missing the point about the 'tag' variable in this CloudDB event carries the tag that was used to write the incoming value to CloudDB.
Review all the places where you write to CloudDB and take note of what you are using there for a tag.
Is it ever a list?
Or is it a specific piece of text?
I neglected to mention that you are a copy/paste addict.
I know this from the hard wired subject areas like 'Academics' in your blocks.
Learn to parametrize procedures, and get your subject areas at run time from storage.
Data has no place in clean code.
Just looked over all of the times I mention CloudDB and I didn't see any where the tag itself is a list, however, most of the values being stored are lists.
Also, what does 'get your subject areas at run time from storage' mean?
Actually I also don't know what parametrize procedures mean. Is that when I use the procedure blocks instead of just putting the blocks down again?
Read
http://www.appinventor.org/bookChapters/chapter21.pdf
from
http://www.appinventor.org/book2
from
I see misunderstanding of tags too often on this board.
Maybe the word 'ID' or 'key' would be better.
A tag is like:
- an identifier
- an effigy
- a driver's license number
- a license plate number
To treat an identifier as if it were the thing it purports to identify is akin to practicing voodoo, pushing pins into dolls wearing the faces , hair, and fingernails of your enemies.
https://www.google.com/search?q=this+is+not+a+pipe
AI2 tags and values chapter:
http://www.appinventor.org/bookChapters/chapter22.pdf
This sample app lets you search the universe from the Big Bang to MIT.
None of the data is in blocks.