importing a list of names
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
importing a list of names
OK, I know this is a flaw in similar apps to what I'm creating, so I'm not overly concerned, but I would prefer to solve this if possible: Do you have any recommendations for allowing users to import a list of names?
Since copy/paste won't work within the app, the best I can come up with is directing users to save a list online somewhere (a public dropbox txt file, perhaps) and then using ask to get the name of the file and import the contents. But that's beyond awkward and leaves way too much room for failure.
Another idea I have is setting up a webpage for teachers to type up the lists, then email a download link to teachers to copy/paste (paste seems to work within ask) the link, but that's not much better...
Since copy/paste won't work within the app, the best I can come up with is directing users to save a list online somewhere (a public dropbox txt file, perhaps) and then using ask to get the name of the file and import the contents. But that's beyond awkward and leaves way too much room for failure.
Another idea I have is setting up a webpage for teachers to type up the lists, then email a download link to teachers to copy/paste (paste seems to work within ask) the link, but that's not much better...
Re: importing a list of names
If you use a UITextView then copy and paste works flawlessly. You can retrieve the text using the getiPhoneControl(CONTROL_NAME, text).
Re: importing a list of names
Oh? Well, I'll have to look into that, then, thanks. I had assumed that there was no solution to a multi-line copy/paste since there was no response to Peter's query a while back. If it works for multiple lines of text, then it'll do the trick. Off to hunt down related documentation!
ETA: Ok, that was a surprisingly short hunt. Unfortunately, it doesn't do more than a single line, according to the release notes. I could... however, I could... see if I can have names separated by semicolons all on one line. It'll be slightly counterintuitive to the user, but I'll play with it.
Still open to any other ideas.
ETA: Ok, that was a surprisingly short hunt. Unfortunately, it doesn't do more than a single line, according to the release notes. I could... however, I could... see if I can have names separated by semicolons all on one line. It'll be slightly counterintuitive to the user, but I'll play with it.
Still open to any other ideas.

Re: importing a list of names
Hi witeowl,
Where is the list and who wants to import it. Could you give an example of what you ideally would like to happen?
Kind regards
Bernd
I don't quite understand what you are trying to do.Do you have any recommendations for allowing users to import a list of names?
Where is the list and who wants to import it. Could you give an example of what you ideally would like to happen?
Kind regards
Bernd
Re: importing a list of names
Well, right now, for a teacher to enter a class roster in my app, they have to type each name separately. That's OK for a single class of 36 names, but many teachers have upwards of 200 students throughout the day, and typing that many names in on an iDevice requires more patience than I think most users would have. I think it would be acceptable if a teacher could type/create a list on a computer, perform a couple of easy steps, then have my app import that list into a selected class.
A list might look like this:
Smith, Johnny
Doe, Jane
Smythe, Jack
Doe, Mary Anne
etc...
My first thought, and what I still think is the easiest option, is to have the teacher email the list to his/her idevice, highlight and copy the list, then paste it into a field in my app. That doesn't appear to be an option because of paste limitations within livecode's current iOS support.
A list might look like this:
Smith, Johnny
Doe, Jane
Smythe, Jack
Doe, Mary Anne
etc...
My first thought, and what I still think is the easiest option, is to have the teacher email the list to his/her idevice, highlight and copy the list, then paste it into a field in my app. That doesn't appear to be an option because of paste limitations within livecode's current iOS support.
Re: importing a list of names
Hi witeowl,
one way to do it would be to turn file sharing on in the Standalone Application Settings -> iOS.
then in iTunes you connect your device and choose your device. In "Apps" there is a setting/section for apps that can share files. There your app shows up if you choose file sharing as above.
There your teacher can import a list of student names. Let them generate the list as text file (.txt)
In your app you can then import that list.
A very rough sketch of how it could be done is:
make one regualar button and an option menu button (name the option menu "optMenu") and a field
The first button has this script
the option menu has this script:
This worked for me on an ipad.
You would still have to do error checking and so on and it is still a hassle to do but I think it is less complicated than sending an email and all that.
And I only used the option menu to test this. You would probably use a different user interface.
You would have to instruct the user how to do this probably but since they save tons of time using your app they might do it. I saved it a text, you could test for the suffix to make shure they don't save it as .doc or somesuch.
Maybe there is an easier way but this is one way to do it.
But don't forget: no grades below 70 should be saved
Kind regards
Bernd
one way to do it would be to turn file sharing on in the Standalone Application Settings -> iOS.
then in iTunes you connect your device and choose your device. In "Apps" there is a setting/section for apps that can share files. There your app shows up if you choose file sharing as above.
There your teacher can import a list of student names. Let them generate the list as text file (.txt)
In your app you can then import that list.
A very rough sketch of how it could be done is:
make one regualar button and an option menu button (name the option menu "optMenu") and a field
The first button has this script
Code: Select all
on mouseUp
put specialfolderPath("documents") into tDocPath
put the defaultFolder into tOldDefault
set the defaultFolder to tDocPath
put the files into tFiles
put "files" && tFiles into field 1 -- debugging
set the text of button "optMenu" to tFiles
set the defaultFolder to tOldDefault
end mouseUp
Code: Select all
on menuPick pItemName
put specialFolderPath("documents") & "/" & pItemName into tWholePath
put url ("file:" & tWholePath) into field 1
end menuPick
You would still have to do error checking and so on and it is still a hassle to do but I think it is less complicated than sending an email and all that.
And I only used the option menu to test this. You would probably use a different user interface.
You would have to instruct the user how to do this probably but since they save tons of time using your app they might do it. I saved it a text, you could test for the suffix to make shure they don't save it as .doc or somesuch.
Maybe there is an easier way but this is one way to do it.
But don't forget: no grades below 70 should be saved

Kind regards
Bernd
Re: importing a list of names
Hi witeowl,
I should add that if you are updating your app without deleting the app from the device or the simulator the documents folder is not updated. This can be confusing if you test the documents folder for files. If you want and empty documents folder you would have to delete the app first and then install it anew. Replace will not do.
Kind regards
Bernd
I should add that if you are updating your app without deleting the app from the device or the simulator the documents folder is not updated. This can be confusing if you test the documents folder for files. If you want and empty documents folder you would have to delete the app first and then install it anew. Replace will not do.
Kind regards
Bernd
Re: importing a list of names
Thanks again, Bernd. I'll play around with that. It doesn't -- to me -- necessarily "feel" easier than emailing a list, but if it works, it has my method beat hands down. 
