Ti.Media.saveToPhotoGallery not working?
So I have 13 views that only have images displayed on them, pulled from a folder in the Resources directory of my App. There is a RightNavButton that pops up an OptionDialog that asks if the user wants to save the file or close. If they save, it pulls the image and saves it to the Photo Gallery. For some reason it crashes whenever "Save Image" is pressed.
Any help?
PS - Yes, the files are named "promo#.jpg", where # starts at 0 and goes to 13.
2 Answers
-
Accepted Answer
is this line of code correct?
if (e.index == 0) {
if you look above, you don't define "e" as a parameter so this
savedialog.addEventListener('click', function() {
should be this
savedialog.addEventListener('click', function(e) {
-
My goodness. Thank you for very much Aaron. Seems I must've missed that. Even the stupidest little mistakes can screw you up! :P
Thank you! :)
Morale of the story: Check you're defining your parameters!