It is currently Sun Dec 16, 2018 4:11 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: WebGadget() - "file://"
PostPosted: Wed Nov 14, 2012 5:46 am 
Offline
Addict
Addict
User avatar

Joined: Sun Apr 27, 2003 8:12 am
Posts: 1988
Location: USA
Unable to load html files in the webgadget.

_________________
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.9.5 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: XP SP3 / AMD 64 4000+ / 1GB DDR / ATI 9250


Even the vine knows it surroundings but the man with eyes does not.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Wed Nov 14, 2012 8:22 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Feb 16, 2009 10:42 am
Posts: 536
Location: sweden
But.... without testing this..... Isn't this exactly how the Purebasic Help works? Isn't that a webgadget with a local file?


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Wed Nov 14, 2012 10:11 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5779
Location: Wales, UK
...on Windows the Help files are Microsoft .chm (Compiled HTML). They are displayed by the default Windows chm viewer.

Try passing the full path of the file to the WebGadget, excluding "file://"

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Wed Nov 14, 2012 11:46 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13436
Location: France
Yes, the help on OS X use the webgadget() with local files


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Wed Nov 14, 2012 2:07 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Feb 16, 2009 10:42 am
Posts: 536
Location: sweden
Code:
OpenWindow(0,0,0,640,480,"")
WebGadget(0,0,0,640,480,"file://"+GetTemporaryDirectory()+"output.html")
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow


this works fine for me...


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Wed Nov 14, 2012 4:01 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5779
Location: Wales, UK
...could the issue be the files themselves? Perhaps they are HTML5 and the webgadget cannot interpret them?

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Wed Dec 05, 2012 4:27 am 
Offline
Addict
Addict
User avatar

Joined: Sun Apr 27, 2003 8:12 am
Posts: 1988
Location: USA
Yeah, it was a HTML5 file.

_________________
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.9.5 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: XP SP3 / AMD 64 4000+ / 1GB DDR / ATI 9250


Even the vine knows it surroundings but the man with eyes does not.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Thu Dec 06, 2018 11:21 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 766
Location: Portugal
Having the same trouble with local files.

The web gadget displays them correctly in the windows version (win xp and win 7.0) but not on the mac.

Is the HTML 5 issue only on the mac?

CD

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Thu Dec 06, 2018 11:43 am 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 398
Maybe a problem with the path.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Thu Dec 06, 2018 11:54 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 766
Location: Portugal
Found the problem.

The file I was attempting to load had spaces in. Changed all these to %20 and It worked.

CD

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Thu Dec 06, 2018 5:00 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 398
Thats what I mean...
You can try the URLEncoder(URL$ [, Format]) to encode the path to a URL.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget() - "file://"
PostPosted: Fri Dec 07, 2018 6:14 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 766
Location: Portugal
URLencoder worked first time. No problems on either platform now.

Must be getting old used that before and forgot.

Thanks for replies.

CD

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye