Personal Pocket PC Wiki

Discussion in 'Open Source Projects' started by tsteward, Aug 1, 2008.

  1. Woinowski

    Woinowski Active Member Licensed User

    Would like to help - what is the exact problem?

    Hi Tony,

    I just looked at your samples and without running them I think they look fine.

    So, do you have more specific problems with Regexes?

    Maybe a classical UNIX manpage could help you, too: regex(7): POSIX.2 regex - Linux man page

    Regards
    Jens
     
  2. tsteward

    tsteward Active Member Licensed User

    The main problem is my lack of knowledge.

    The regex that I have post works well. I believe that if I can convert the rest of the sub "parseBlade" (or at least most of it) to regex instead of looping through the file checking every single character, then it will be much faster.

    I have attached my wikipage "Ford". On my ppc it takes around 2 minutes to load. Now with my current parseBlade sub it is down to around or under a minute.

    I need help to crete regex for the unsorted lists and sorted lists which can be nested.

    Thanks Heaps any and all help appreciated
     
  3. digitaldon37

    digitaldon37 Active Member Licensed User

    Compressed Text

    How about removing unnecessary spaces before parsing it? That seems like it would be easy to do with regex, especially if you are loading the whole file into a string.

    Your test file didn't have any complicated spacing (ie two words separated by a space) so I used notepad's "replace/all" to remove the spaces and then parsed it in the older parser. The file was 1/2 the size and loaded much quicker.
     
  4. tsteward

    tsteward Active Member Licensed User

    Thanks Don,
    I didn't think of that. That removed about 2000 cycles out of the parser checking to see if those spaces needing anything doing to them. & yes regex fixed it brilliantly.

    I wish I understood regex better, I could probably take over the world they are so powerful. Although there not the whole answer.

    I have other even longer pages without the white space to cleanup so I will constantly be looking for ways to speed up things.

     
    Last edited: Sep 4, 2008
  5. tsteward

    tsteward Active Member Licensed User

    Ok I have been programming my fingers off. My head is just about fried.
    The latest version has been posted back in message #1.

    I have achieved pretty much what I originally set out to do. Of course now I want more. Don't we always.

    Anyway although this is labeled version 0.60 consider it a beta V1 release. I now would like people to report bugs (PPC version only). Its time for me to stop adding features and cleanup things.

    Version 0.60(beta 1)

    • Added speed up code for section links. They nolonger re-load the whole page and re-parse the whole page.
    • Fixed up section linking to create desciptive links.
    • Cancel button in editing nolonger re-loads and re-parses the page un-necessarily.
    • Using link button on shortcut form will give a list of of available pages if no text is highlighted
    • Fixed section and live links
    • Now uses temp html file
    • Fixed check wiki syntax menu now checks the correct menu item
    • Fixed tables again
    • Fixed wiki parser not allowing <,>,# or $ in normal text
    • Added edit short cut buttons - tourn on or off via options
    • Added Insert Contents menu option to edit menu
    • Added About form
     
  6. tsteward

    tsteward Active Member Licensed User

    Found and Squashed Bugs for version Beta 1:
    • If you click on a section link, then click on any link to another page it only half works.
    Found & Not Squashed Bugs:
    • Links to sections on a differant page - don't work at all.
     
  7. digitaldon37

    digitaldon37 Active Member Licensed User

    Checklist

    Tony,

    Attached is a checklist I put together to help me go test all of the features. Please add/edit and add to your #1 post if you wish.

    Here are a couple of things I noticed:

    1. In edit mode, the "[]" always prints "[" even if I'm trying to close the tag.
    2. Grey space on top after switching between landscape and portrait mode

    I also noticed that when I copied the "ppcw.ini" file from desktop to pda I got an error. The problem is the ini setting for the directory - the PDA chokes on the PC directory string. We may want to use one value for WikiDir for the PC and a different one for the PPC, and use the one for that platform. Maybe "wikiDirPPC" and "wikiDirPC" and then assign to WikiDir depending if CPPC is true or not.
     
    Last edited: Sep 5, 2008
  8. tsteward

    tsteward Active Member Licensed User

    Hi Don,
    I don't get any grey space when switching on my ppc. I have tried in view mode and in edit mode. The only time I do is if I go into config and turn of shortcut buttons. But as stated on that screen changes will not apply until restart.

    Yes the "[" situation is lazyness on my part I will fix that.

    I agree with the ini problem. I was thinking like a programmer and I personally don't sync the ini file, but you can bet a user would and that would only leed to frustration for them.

    Thanks for your comments

     
  9. tsteward

    tsteward Active Member Licensed User

    Hi Don,
    Sorry I have only just attempted to use this new file but it will not just pluging. You have changed the name of the sub. also declared something I cant remember at the moment.

    You might like to look into this.

    Regards
    Tony

     
  10. tsteward

    tsteward Active Member Licensed User

    I thought I had it fixed but alas I'm stuck.

    If you click on a section link to a header in the current page it works perfect on both pc and ppc.
    Then if you click on a standard link it works on the pc but on the ppc it only half works. It loads and parses the new file but does not refresh the browser. If you hold down the stylus and select refresh from the popup menu the page is then displayed. The same thing happens if you click on a section link to a new page.

    Any ideas on how and where I can refresh the browser?

    Current code attached.
    Subs concerned are:
    Sub web_navigating
    Sub Parse(url)
    Sub RefreshWeb
     
  11. Cableguy

    Cableguy Expert Licensed User

    Wich Browser dll are you using?
    I remember that Andrews dll did miss some basic methods and properties, that shouldn't be that hard to include in a modded version dll...
     
  12. digitaldon37

    digitaldon37 Active Member Licensed User

    slash parser (include file)

    Attached is version .23 of the slash parser. I am using the stringsEx library so this needs to be added to the project. Also need to add these controls:
    • strb - StringsBuilder
    • stre - StringsEx

    I noticed that slash linking wasn't working since we changed to using a temp HTML file for display, so I fixed that as well.

    Cableguy, we are using agraham's web browser library. I think Tony may be looking for a refresh method, which I don't see in that library or the dzHtmlView one. I haven't tested what he is experiencing but it sounds like he is looking to navigate to a temp html page, and then do a refresh so that section links will work

    9/8/08 update: updated parser to handle http: links and better format tables
     
    Last edited: Sep 9, 2008
  13. Cableguy

    Cableguy Expert Licensed User

    This is Andrew's Browser dll with a few new props and methods...
    Props
    -ShowScrollBars set wether scroll bars are visible or not
    -DocumentText now also retrives the current browser document
    Methods
    -BringToFront brings the control to the top most z-order
    -Refresh reloads the current document and updates the display

    Myclass.cs is the source file, and should be renamed as WikiBrowser in order to be merged in the exe..

    Hope this will help...
     
    Last edited: Sep 6, 2008
  14. agraham

    agraham Expert Licensed User

    I deliberately retricted functionality to that available on the device. The desktop WebBrowser is far more capable than the device.

    From How to: Use the WebBrowser Control in the .NET Compact Framework
    Refresh will only work on WM5.0 or later, I wanted to target older devices as well.
    DocumentText is write only on a device. Only on the desktop is it readable.
     
  15. Cableguy

    Cableguy Expert Licensed User

    Targeting device with Windows Mibile 2003SE and older is like targeting Windows95...
    Yes, but the user may need some features diferently on the desktop...
    For instance, I'm trying (Still) to get the WebBrowser to ZOOM, even thought I KNOW it only works with IE7, and only in the desktop...
     
  16. agraham

    agraham Expert Licensed User

    Rubbish! - Basic4ppc still targets .NET 1.0/1.1 even though 3.5 is now available on the device. Stuff has to work on the installed user base not just the latest products.
     
  17. Cableguy

    Cableguy Expert Licensed User

    I think you miss understood me....
    I was not trying to say that we shouldn't target those older platforms....
    However, making sure that our app is that much backward compatible, makes us unable of making the most of the newer platforms....There is now a flash reader for WM6, wich doesnt exist for WM2003SE, So WE SHOULDNT build flash enabled app's?????
     
  18. agraham

    agraham Expert Licensed User

    Certainly looked like it!

    Now that you have modified and reposted my code without consulting me I assume that you will now be providing the support for it in the future.
     
  19. Cableguy

    Cableguy Expert Licensed User

    Assuming that you are NOT just being pedantic, I appologise for that...
    I know in first hand how much effort goes into creating a custom lib.
    I never in any point did put you off or suggested that this lib was my work.
    As stated it is just a mod, so the basis are still yours....all the comments are still there, and not even the version number was altered...
    No mention whatsoever in the files about me...
    I did wrong, am I intented no harm, nor to get you mad...I guess I was just
    too eagger to help, and jumped the gun...
    I can take the atachment out if you whant me to, heck i can delete all my previous post in this thread, if that what it takes...

    But being this such a popular thraed, in wich you have participated in various ocasions, I didnt thought you would be so sour...

    AGAIN, I AM SORRY FOR POSTING AN MODDED AGRAHAM'S DLL WITHOUT CONSULTING HIM....
     
  20. tsteward

    tsteward Active Member Licensed User

    Wow Time Out

    I really appreciate any help anyone is willing to give.

    That said please take this little dispute elsewhere, maybe PM each other and sort it out there.

    Again I appreciate the help and effort from everyone. Without these library's that you people spend many hours on, then donate free of charge, I would not be able to create my application, so thank you ver much, but this dispute has the ability to takeaway from this discussion and may put of people who also want to help but become afraid of commenting.

    Please if you can add constructive comments, suggestions or help then do so. I need help as I am only new to B4PPC and I am not a programmer by any measure.

    Thanks
    Tony
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice