iOS Browser Widget and PDFs? SOLVED
JOHN PATTEN
johnpatten at me.com
Fri Jul 7 13:00:22 EDT 2017
FWIW…
The issue was related to the specialFolderPath. When I was testing this aspect of the app I had it point to specialFolderPath(“Desktop"). Naturally, on the iPad I changed it to specialFolderPath(“engine”) thinking that would cover the iOS app. Nope. Apparently you can’t save files (pdfs) to the “engine” folder.
I changed it to specialFolderpath(“Documents”) and everything seems to be good now.
Cheers!
John Patten
SUSD
> On Jul 6, 2017, at 3:32 PM, JOHN PATTEN via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> I had it “Answer" me the path to the pdf in the iOS app on the iPad and it reports back:
>
> /var/containerns/Bundle?Application?CA0B0721-80F7-4B24-92C4-0B156D/PTP System.app/Teacher Laptop Replacement Quote (19).dpf
>
> This should be the path that the - set url of the widget “quoteBrowser” - is set to on the , correct?
>
> Thank you!
>
>
>> On Jul 6, 2017, at 3:19 PM, JOHN PATTEN via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> Hi All!
>>
>> I have little app that I’m using track our department quotes/purchases etc. It pulls the info out of a mySQl db. I have an issue with browser widget displaying the pdf quotes on iOS. The app pulls the PDF out of mysql via:
>> Put "SELECT attachment FROM quotes WHERE name ='" & jQuote & "'" into btSQL
>>
>> put revDataFromQuery(tab, cr, gConnectionID, btSQL) into btData
>>
>> put base64Decode(btData) into vtemp
>>
>> put specialFolderPath("engine") & "/" & jQuote into vPath
>>
>> open file vPath for binary write
>>
>> write vtemp to file vPath
>>
>> close file vPath
>>
>> I then have to replace the spaces in the name of the pdf file with a:
>>
>> replace space with "%20" in vPath
>> set the url of widget "quoteBrowser" of cd id 1067 to "file:" & vPath
>>
>> replace "%20" with space in vPath
>>
>> set the script button "Print Quote" of cd id 1067 to "on mouseUp" & return & "Launch url " & quote & "file:" & vPath & quote & return & "end mouseUp"
>>
>>
>> Again this works fine on my Mac and on the iOS simulator. The PDF shows up just fine in the browser widget.
>>
>> However, when I build the app, and try it out on he actual iPad, it does not. I just get the blank white widget.
>>
>> Any suggestions on what I might try?
>>
>> Thank you!
>> _______________________________________________
>> 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