App-Inventor-Gallery
App-Inventor-Gallery copied to clipboard
Previous Owner broken during Upload
Found a bug. For some reason, previous authors aren't being stored properly during new app creation. To reproduce this bug, simply "upload" a new app with anything you like in most fields, just make sure that the Previous Owners field contains some text. Then switch to another module, and back again. This error is the MApps.getAppList attempting to process an array of previous authors, where instead it only receives a string.
It looks like addOrEditApp() in MApps.js needs code like the following to be added before the put() call:
if (typeof appData.previousAuthors == "string") { appData.previousAuthors = appData.previousAuthors.split(","); }
and the ObjAppData constructor needs
previousAuthors : []
in the setData call for the initial field values.
For the time being, I've disabled the editing field for the author chain. When we're ready for it, it will almost certainly not be a plain text field.
If you type in the url:
http://app-inventor-gallery.appspot.com/rpc?tag=tag:Graphics
and search through the resultant JSON for the "previousAuthors" field of the app i just created named "PreviousAuthorChain?" you'll see that previousAuthors is still being written the the DB, just the input box is disabled, so the following is written on every addition to the database:
"previousAuthors":["<","n","o","t"," ","y","e","t"," ","i","m","p","l","e","m","e","n","t","e","d",">"]
Something tells me this is not what you wanted.
Probably not. I'll look at it. To me.