Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

downloading a file, question on how to call function


I am attempting to use the code in the answer to this question:

I do not think I am calling the function correctly. Here is how I am trying to call it: get_remote_file('iphoneimage.jpg','http://nickbodmer.com/temp/iphoneimage.jpg');

this gives the following error within titanium

[WARN] Exception in event callback. {
expressionBeginOffset = 1066;
expressionCaretOffset = 1072;
expressionEndOffset = 1082;
line = 35;
message = "Result of expression 'fn_end' [undefined] is not a function.";
name = TypeError;
sourceId = 237348568;
sourceURL = "file://localhost/Users/Nick/appcelerator/scrollview/scrollview/Resources/app.js";
— asked December 3rd 2010 by Nick Bodmer
  • download
  • error
  • file
  • iphone
1 Comment
  • looks like you just cut and pasted the code from that question and the code is not complete… there are variables and functions missing

    — commented December 3rd 2010 by Aaron Saunders

2 Answers

  • does this persistently download the file? As far as I can tell, it does not.

    — answered December 3rd 2010 by Nick Bodmer
    • it saves the file to the local device… is that what you mean by "this persistently download the file?" Why do you think it doesn't… It is basically the same code from the question you referenced but it is complete… I would suggest you try it and if you have a problem let me know

      — commented December 3rd 2010 by Aaron Saunders
    • Did you ever get this working?

      — commented December 4th 2010 by Aaron Saunders
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.