Download does not work in standalone

Tore Nilsen tore.nilsen at me.com
Fri Oct 9 14:48:43 EDT 2015


Thanks for the suggestions. I will try the “try” approach. I guess from the fact that I get a proper download from the IDE, that the url is correct, but I will make provisions to make sure it is anyway. I had a couple of instances where the url, which is dynamic, depending on other choices the user makes, was not correct. This did also show up in the IDE.

Thanks again.

Tore
> 9. okt. 2015 kl. 20.41 skrev Mark Schonewille <m.schonewille at economy-x-talk.com>:
> 
> Hi Tore,
> 
> Probably you need to check that the script actually gets as far as the libUrlSetStatusCallback command. Insert a beep right before the command to check this.
> 
> Second, to check that libUrl is available, you could add a try-control structure:
> 
> try
>  beep
>  libUrlSetStatusCallback "showProgress",the long id of me
>  libUrlDownloadToFile tResourcePath,tPath,"downloadComplete"
> catch myErr
>  answer myErr
> end try
> 
> Do you hear a beep and don't you get an error message?
> 
> It seems obvious, but could you double-check that the address you're downloading from is correct put adding the line
> 
> put tResourcePath
> 
> to your script, copying the address from the message box and pasting it into the browser to see what happens?
> 
> Mark Schonewille
> http://economy-x-talk.com
> 
> Buy the most extensive book on the
> LiveCode language:
> http://livecodebeginner.economy-x-talk.com
> 
> Op 10/9/2015 om 17:52 schreef Tore Nilsen:
>> Yes, at least I manually selected it in the standalone application settings, as my experiences with the CEF-library was that it would not be included automatically. But it seems as if the Internet library is not included in the build anyway. I have tried to reset it on several occasions. At best it seems to be downloading, but showProgress is not triggered, and the downloaded file is empty.
>> 
>> I am on Indy 7.1 on OSX 10.11.
>> 
>> Tore
>> 
>>> 9. okt. 2015 kl. 17.47 skrev Mark Schonewille <m.schonewille at economy-x-talk.com>:
>>> 
>>> Did you include the Internet library (is not the browser external) in your standalone, in de standalone application settings?
>>> 
>>> --
>>> Kind regards,
>>> 
>>> Mark Schonewille
>>> Economy-x-Talk
>>> Http://economy-x-talk.com
>>> 
>>> Share the clipboard of your computer over a local network with Clipboard Link http://clipboardlink.economy-x-talk.com
>>> 
>>> 
>>> Op 9 okt. 2015 om 13:41 heeft Tore Nilsen <tore.nilsen at me.com> het volgende geschreven:
>>> 
>>>> I am having trouble with this script in a standalone application for OSX. It works alright in the IDE, but will not work when a standalone is built.
>>>> 
>>>> on mouseUp
>>>>  hide group "DownloadInfo"
>>>>  put gValgtLeksjon & ".pdf" into tFilNavn
>>>>  ask file "Velg hvor du vil lagre filen:" with tFilnavn as sheet
>>>>  if the result is not "Cancel" then
>>>>     put it into tPath
>>>>     if field "Ressurser" of card gValgtLeksjon of stack "Lessons" is empty then
>>>>        put gThisPage & "/pdf" into tResourcePath
>>>>     else
>>>>        put field "Ressurser" of card gValgtLeksjon of stack "Lessons" into tResourcePath
>>>>     end if
>>>>     put "Laster ned fil: " & tFilnavn into field "DownloadInfo"
>>>>     if char 1 to 4 of tResourcePath is not "http" then
>>>>        answer tResourcePath & " er ikke en gyldig lenke!" with "Avbryt"
>>>>        if it is "Avbryt" then
>>>>           exit mouseUp
>>>>        end if
>>>>     end if
>>>>     libURLSetStatusCallback "showProgress",the long ID of me
>>>>     libURLDownloadToFile tResourcePath,tPath,"downloadComplete"
>>>>  end if
>>>> end mouseUp
>>>> 
>>>> I also had some problems with the CEF-browser, but choosing libraries manually in the standalone settings solved that problem. Somehow it seems as if the internet library is not included in the standalone files.
>>>> 
>>>> I wonder if anyone has any solutions to this problem.
>>>> 
>>>> Regards
>>>> Tore Nilsen
>>>> 
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list