GLBasic forum

Main forum => GLBasic - en => Topic started by: Neurox on 2011-Oct-14

Title: NETWEBEND on iOS
Post by: Neurox on 2011-Oct-14
Hi,
I've a strange error with NETWEBEND function.

Code (glbasic) Select
NETWEBEND "file://"+Cartella$+"test.html"

and this is a debug result under iPhone :
Code (glbasic) Select
exiting with url file://private/var/mobile/Applications/594A6FC3-CC13-4855-B9F4-D5BB60C8597B/testprint.app/Media/test.html
Ignore the bad exec that will come now ;)


but under windows xp the app run the browser.

Bye bye,
Neurox
Title: Re: NETWEBEND on iOS
Post by: MrTAToad on 2011-Oct-15
Its quite possible that iOS won't/can't deal with file://
Title: Re: NETWEBEND on iOS
Post by: spicypixel on 2011-Oct-15
Code (glbasic) Select
file://refers to a local file so I'm guessing it's a read access issue.
Title: Re: NETWEBEND on iOS
Post by: Neurox on 2011-Oct-15
Obviously I tested without FILE:// with same result :(
Title: Re: NETWEBEND on iOS
Post by: spicypixel on 2011-Oct-15
I wonder if saving the file out from within your app to PLATFORMINFO documents by using WRITELINE or WRITESTR 1, text$ + "\n" would then allow you to view it using NETWEBEND. You don't even need to worry about all the headers if you want to test it just save out a file with the .htm extension and then see if NETWEBEND will view it. Worth a shot ?
Title: Re: NETWEBEND on iOS
Post by: Neurox on 2011-Oct-17
I've wrote a HTML file with WRITESTR and saved in PLATFORMINFO$(DOCUMENT).
But I received the same error :  "Ignore the bad exec that will come now"  :(

Title: Re: NETWEBEND on iOS
Post by: Kitty Hello on 2011-Oct-17
It's like this, I think:
You write the local file to the documents directory of your app. the webbbrowser gets started, but it can't access this file, because it's in another app and has no read-rights for your apps directories.

There is a way to make a html-viewer in a button (code on forums, just search).

Another way would be to write the file to a place where you can read and write from any app. But Apple will surely disapprove this app, then.
Title: Re: NETWEBEND on iOS
Post by: Neurox on 2011-Oct-17
Code (glbasic) Select
There is a way to make a html-viewer in a button (code on forums, just search).

I've just tested it but the call window.print() not function!
Title: Re: NETWEBEND on iOS
Post by: Kitty Hello on 2011-Oct-18
Haaaaaa!!!!
it must be "file://" plus the path, thus 3x "/":
If it's not working try this path:
"file:///var/mobile/Media/pdf/myout.html"
Title: Re: NETWEBEND on iOS
Post by: Neurox on 2011-Oct-18
Sorry Gernot,
but not function  :'(
:giveup:  :'(
Title: Re: NETWEBEND on iOS
Post by: Kitty Hello on 2011-Oct-19
Trucidare yesterday mentioned he will look into it and provide a working example.
Title: Re: NETWEBEND on iOS
Post by: Neurox on 2011-Oct-19
Quote from: Kitty Hello on 2011-Oct-19
Trucidare yesterday mentioned he will look into it and provide a working example.

This is a good news  =D