Closed derrell closed 12 years ago
See also #115 which deals with using the saved name as the default on a download.
Paul, to implement this, you will need to modify aiagallery.module.dgallery.mystuff.CellEditorFactory which pops up when an existing app that you've previously uploaded is double-clicked, or when the Add Application button is pressed. That code makes use of qooxdoo-contrib project "UploadWidget" and in particular, its UploadButton class. The first thing to do is to review the UploadWidget contrib and UploadButton class to determine how you find out what file name the user selected. We already catch the "changefilename" event, and it probably is available there. In fact, Fsm.js:469 retrieves the "selection" which may in fact be the file name. The file name needs to be saved and added to the RPC.
Step 2 will be to modify the RPC and the ObjAppData to actually store that data. We can talk about this.
You'll really have to dig in and understand what's going on here, but I think you're ready for it.
Derrell
Time Estimate:
Total Est Time: 3 hrs
Time to Complete: ~5 hours
Took some time in the beginning to figure out the 900 line FSM code, and what was going on with the different states and transitions. Attempted it one way which worked, but after studying the code carefully, found a proper, more elegant solution. Instead of creating a new object on the FSM to store and retrieve my filenames at a later state. I found that the Button Object that was already stored as user data in the FSM. After using firebug to carefully examine it's contents, I found that the filename string was already a part of this object. I simply extracted it properly in the FSM's call to the RPC.
Also added some extra changes to show filenames in MyApp GUI Grid list
Hi Derrell, this issue can be closed, the pull request #158 for this has already been merged into your SWEDEV and closed.
some kind of extra info gets added to the filename ... e.g., i uploaded a file named "gear.zip", and it appears as C:\fakepath\gear.zip. p.s. this was uploaded from a Linux box
The issue is fixed with Pull Request #185. This has been merged to Derrell's SWEDEV branch already, so closing this issue.
This is happening again when uploading with Chrome.
E.g. see my Aqua app or my Star Blaster app.
It's not an "again" but rather a "sometimes". Many of the uploaded apps have correct data; others do not.
I thought this was a browser issue and was fixed?
Funny I thought it was. It was a difference of Chrome vs Firefox and happening consistently. I added a procedure to strip out the file path. I'll take a look.
Thanks
On Sun, Dec 4, 2011 at 12:06 PM, Fred Martin < reply@reply.github.com
wrote:
I thought this was a browser issue and was fixed?
Reply to this email directly or view it on GitHub:
https://github.com/derrell/App-Inventor-Gallery/issues/114#issuecomment-3007452
I already took care of it.
Sent from my Android phone. On Dec 4, 2011 6:52 PM, "Paul Senatillaka" < reply@reply.github.com> wrote:
Funny I thought it was. It was a difference of Chrome vs Firefox and happening consistently. I added a procedure to strip out the file path. I'll take a look.
Thanks
On Sun, Dec 4, 2011 at 12:06 PM, Fred Martin < reply@reply.github.com
wrote:
I thought this was a browser issue and was fixed?
Reply to this email directly or view it on GitHub:
https://github.com/derrell/App-Inventor-Gallery/issues/114#issuecomment-3007452
Reply to this email directly or view it on GitHub:
https://github.com/derrell/App-Inventor-Gallery/issues/114#issuecomment-3009893
Currently when the source and apk files are uploaded, only their mime type and content are saved, not the original file name. We should save the original file name, so that it can be used as the default download file name.