March 03, 2021, 02:35:25 AM

Author Topic: Make HtmlView Gadget forget history  (Read 169 times)

Offline Midimaster

  • Jr. Member
  • **
  • Posts: 19
    • Midimaster Music Education Software
Make HtmlView Gadget forget history
« on: February 15, 2021, 03:49:23 PM »
Hi, I'm using the HtmlView-Gadget to show the user several informations: The game's User-Manual is completely html-based, but also the Game-Result-Page at the end is displayed with the same HtlmView-Gadget.

In the User-Manual I offer a BACK and a FORWARD button zu enable the user to navigate through the manual.

Now I observed that if the user clicks often on BACK in the User-Manual, he is able to suddenly "navigate" back to the Game-Result-Page which showed the game results 10min ago. 

now my question: Is it possible to reset the Html-Gadget, so that it "forget" previous URLs?
See my current project on PlayStore: 20Tracks-Audio-Player https://play.google.com/store/apps/details?id=midimaster.twentytrackd

Offline Dabz

  • Sr. Member
  • ****
  • Posts: 408
  • Is it cos I is ginger?
    • dabzy.co.uk
Re: Make HtmlView Gadget forget history
« Reply #1 on: February 15, 2021, 04:35:28 PM »
Can you not track the forwarding and the backwarding somehow, so, when the user clicks back constantly, they get to the "Home" page, and, well, intercept another back click with a HTMLGo("Home"), thus, not looping back to the results page.

Or, split the User-Manual and Game-Results pages into separate views, use panels to toggle between the two.

Free the HTMLView if you can when the player leaves the game result page, then create a new one?

Just some idea's, as I dont think their is a way to clear the history from the HTMLView, though, I'm probably wrong! :D

Dabz
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Offline Midimaster

  • Jr. Member
  • **
  • Posts: 19
    • Midimaster Music Education Software
Re: Make HtmlView Gadget forget history
« Reply #2 on: February 16, 2021, 11:57:52 AM »
thank you for your idea, but it will not work....

it looks like the HTtmlView does not report correct the current displayd url.

In the manual the user can click on text based links to jump to chapters. like:

manual.html#chapter1

On the BACK-Button I let me report with HtmlViewCurrentURL(HtmlView), what the current displayed page is. But jumping completely back to the start URL is not possible, because already one step before beeing HOME the HtmlViewCurrentURL(HtmlView) answers already with the start URL, but the HtmlView still show a Chapter (deep inside the manual).

would I now use a ....
Code: BlitzMax
  1. IF HtmlViewCurrentURL(HtmlView)<>FirstURL

... the last BACK step will not be done.

But... If I don't use the If-Statement, I'm able to step back. But after clicking at penultimate step now the former document appears. Again HtmlViewCurrentURL(HtmlView) show the current documents URL. After another BACK-step suddenly the HOME of the current document appears.

Strange!!!!

Code:
Code: BlitzMax
  1. Case Button[BUT_BACK]
  2.         Print "BACK STEP"
  3.         Print "First URL=" + firsturl
  4.         Local current$=HtmlViewCurrentURL(HtmlView)
  5.         Print "current before=" + current
  6.         If current<>FirstURL
  7.                 HtmlViewBack HtmlView
  8.         EndIf
  9.  


 
See my current project on PlayStore: 20Tracks-Audio-Player https://play.google.com/store/apps/details?id=midimaster.twentytrackd

Offline Dabz

  • Sr. Member
  • ****
  • Posts: 408
  • Is it cos I is ginger?
    • dabzy.co.uk
Re: Make HtmlView Gadget forget history
« Reply #3 on: February 16, 2021, 12:32:05 PM »
Well, I'm not sure then, though, I know Brucey's WXWidgets mod thingy me jobby does indeed have a HTML view control and it contains a clear history member, might mean migrating your code to that, but, it is a billion times better then MaxGUI anyway.

Thats all I have really.

Dabz

EDIT: https://docs.wxwidgets.org/3.0/classwx_html_window.html#a0cf30ee8ee03ff0fa6ee42fb349bb851
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal