Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations > Open Source Projects
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Open Source Projects The place to discuss Basic4ppc open source applications.

Personal Pocket PC Wiki

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 08-02-2008, 11:06 PM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Quote:
Originally Posted by digitaldon37 View Post
Tony,

I've tried everything I can think of - this works on my PC but I get an "invalid address" on the PDA. I've written and rewritten the web_navigating procedure and get the same results.

Is this working on your PDA?

Don
No its not working I get error:
Quote:
This URL is not properly formatted.
Reply With Quote
  #12 (permalink)  
Old 08-02-2008, 11:44 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 215
Default wiki .12

I'm still getting the invalid addresses in the web browser, but at least now I'm able to navigate to the linked pages.

Attached is latest version.

I don't get the error on the main page, or when saving after an edit (which does a wb.document) - only when clicking on a link and navigating to another page. And only on the PDA.

The PDA is adding intermediate page urls such as "blankTEST" when I click on the test link. I'm intercepting those pages and reformatting but it still throws a PIE error.

Frustrating!
Reply With Quote
  #13 (permalink)  
Old 08-03-2008, 07:29 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Agreed I get the same error.
Maybe this is something the author of WebBrowser.dll could help with? or do you thinks its PIE causing the problems.
Reply With Quote
  #14 (permalink)  
Old 08-03-2008, 08:09 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

What OS have you on the PDA? Devices have different functionality depending upon the OS as I partially documented in the help. See this page How to: Use the WebBrowser Control in the .NET Compact Framework although I would treat it as a guide rather than gospel.

The .NET Compact Framework WebBrowser control is very limited compared the desktop version and although I have limited the functionality in the library to that (nominally) available on the device it may work differently as the underlying browser controls are different. This may be why css doesn't work on the device - if indeed it works on the desktop.

By the way, I am a systems engineer not a web designer so I know little or nothing (nor want to ) about webby stuff - HTML, style sheets etc. so I can't help out with anything related to content - only funtionality and even then I will need example code, preferably bare-bones, that I could run to see the problem.
Reply With Quote
  #15 (permalink)  
Old 08-03-2008, 10:04 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

I am using Windows Mobile 6.
The problem is not so much loading or using the css file.
The problem we are having is that when clicking on a link we cant load the file as we get an error "URL is incorrectly formatted". However on the desktop it works fine.

digitaldon37 may be able to give a better explaination. But we load the first text file and convert it into html and send it to the browser. Clicking on a link we trap that, extract the filename and load that text file. Convert it into html and on the cycle goes.

Please download the file on post #1 and run it on your device if possible.

All help appreciated

Thanks
Tony
Reply With Quote
  #16 (permalink)  
Old 08-03-2008, 10:18 AM
Basic4ppc Veteran
 
Join Date: Apr 2008
Location: Gosford NSW Australia
Posts: 223
Send a message via MSN to tsteward
Default

Here is a barebones or as close as I can get version.
Reply With Quote
  #17 (permalink)  
Old 08-03-2008, 12:54 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I don't really understand what all this "about:" and "href" stuff is about but after a couple of hours of trial and error I got BareWiki working on my device by changing

HtmStr=Htmstr & "<a href='" & SubString(wiki,x+1,y-x-1) & "'> ...

to

HtmStr=Htmstr & "<a href='about:" & SubString(wiki,x+1,y-x-1) & "'> ...

On my WM2003 device I didn't get that "URL is incorrectly formatted" error, it just didn''t work. If I had paid due attention to your error I might have zeroed in a bit quicker. Just shows how details pay off in debugging (or should have done!).

If you have further problems note that although you might get away with assigning DocumentText in the Navigating event you might get reentrancy problems - or you might not. YMMV.

Note that one time waster I encountered was that I discovered that, on Vista at least, having the device connected to the desktop screws up Internet Explorer and the WebBrowser control - I think because the Mobile Device Center/ActiveSync drivers mess around with the network settings on the device and assign it a new IP (or something!).

Last edited by agraham : 08-03-2008 at 12:58 PM.
Reply With Quote
  #18 (permalink)  
Old 08-03-2008, 08:51 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 215
Default pda error

I think the problem is related to reentry. There are a couple of other procedures where the web.document is being set and no error is generated. This seems to only throw an error on the PDA when setting web.document in the web_navigating procedure.

I'm not sure how I can work around that, as I am using the web_navigating procedure to trap the click. It seems that trapping the click (which invokes the web_navigating procedure) to set the web.document property in turn generates an event that calls web_navigating.

I tried adding an "on error" but it doesn't work - this seems to be an error that PIE is messaging back.

The only thing I can think of is to modify the browser wrapper to validate the URL and to return invalid ones and pass along valid ones. But at the moment I'm not sure what is being considered invalid URLs.

In case anyone is interested, I added some debug printing (see attached) - in this example the program loads the main wiki page (one call to web_navigating) and then I clicked on the "test" link (two calls to web_navigating)

Last edited by digitaldon37 : 08-03-2008 at 09:17 PM. Reason: added Debug File
Reply With Quote
  #19 (permalink)  
Old 08-03-2008, 09:22 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by digitaldon37 View Post
I'm afraid that as far as I am concerned you are pretty much on your own unless some other guy that knows about this HTML stuff (Alfcen?) can comment. The WebBrowser library has no logic in it, it merely exposes to B4ppc the WeBrowser properties and methods so what you are seeing is what the .NET WebBrowser control does. I know how to write code, I don't know how to write HTML and investigate the functionality of the WebBrowser.

Incidentally have you seen what badkarma has done using the WebBrowser library. He has managed to work around the OS differences and it is quite impressive http://www.basic4ppc.com/forum/share...nture-pda.html He is doing this with some sort of local (non-Internet) links but I have no idea how!

Last edited by agraham : 08-03-2008 at 09:27 PM.
Reply With Quote
  #20 (permalink)  
Old 08-03-2008, 10:06 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 215
Default pda error - web.document

agraham,

Thanks for the suggestion. I looked at the source for AdvPDA and noticed that he is not setting web.document within web_navigating. I think I will have to come up with something like he's doing; he has links within his browser display and is able to intercept the click and parse the link (for "north", "south" etc)

The debug file that I ran on the pda shows that on a click the navigating procedure is called, parsing is executed, navigating procedure is called, and then there are two navigating ends. In other words it looks like a nested call - and that the error is generated on the inner one.

I'm not sure why this causes a URI error on the PDA and not on the PC. The PC version of IE must be more forgiving.

UPDATE: I don't think it's the multiple calls within the procedure - I think that the problem is pocket IE doesn't like any URIs besides "about:blank" I can type in "about:blank" into the web browser and there's no error, but if I type in "about:test" (one of our links) it causes an error.

In my code, the top level page's navigating.url is "about:blank" (so there is no error) but the links from within that page have a navigating.url that is like "about:test" (which causes PIE to throw an invalid address error)

Last edited by digitaldon37 : 08-04-2008 at 12:13 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Pocket Wiki digitaldon37 Open Source Projects 4 12-30-2009 03:12 AM
Written a Personal Wiki? tsteward Questions (Windows Mobile) 3 08-01-2008 05:34 AM
Pocket Chess Database JamesC Share Your Creations 3 07-27-2008 05:07 AM
B4P Wiki meinewelle Questions (Windows Mobile) 5 05-30-2008 07:55 AM
print class for pocket pc tanrikuluahmet Basic4ppc Wishlist 1 10-01-2007 10:10 AM


All times are GMT. The time now is 03:02 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0