New Windows HTMLKit/Viewer: Where to store temp files for viewing?

filestream closed?

Yep. Still trying to figure out why a second reload works but first one doesn’t.

Yep seems to be your local browser cache settings. Disable cache in IE manually and re-check.
IE Engine browser caching can be controled via Windows Registry.

This is happening on Mac and Windows, but it definitely could be a cached issue, though not sure whey the second load wouldn’t encounter the same issue.

As far as I remember (my html control is couple of years old) I did a quirk and loaded it twice…this is what my comments say…
it’s only a quirk if the customer knows it :wink:

Hey, I “figured it out”!

On Mac I can just load the page source and supply a folderitem for the relativeTo parameter. It works no problem. Worked on windows before too.

On Windows, you can’t do it that way because the relativeTo won’t work and images in the HTML or CSS won’t load relative to that folderitem. So you need to save the source to an actual html file and load that BUT when you do that, the page seems to not actually load into the htmlviewer if you just recently saved it to disk. So just make a timer that puts a delayed reload on the page again and ta-da, it’s working like it was before.

[code]#if TargetWindows then
//windows we need to save to disk and then load that.
if ModHTMLOverview.TempFolderItem<>nil then
if ModHTMLOverview.TempFolderItem.Exists then
ModHTMLOverview.TempFolderItem.Delete
end if

dim tto as TextOutputStream = TextOutputStream.Create(ModHTMLOverview.TempFolderItem)
if tto<>nil then
  tto.Write(fullHTML)
  tto.Close
end if

end if

//windows can’t immediately load the page. so if “reloadData” is true we know this was called to actually reload the page, so we’ll need to delay the loading of the page into the viewer
if reloadData then
dim tm as new timer
tm.mode = timer.ModeSingle
tm.Period = 250
AddHandler tm.action, AddressOf WindowsLoadHTMLDelayed
myWindowsTimer = tm
else
if ModHTMLOverview.TempFolderItem<>nil then
me.LoadPage(ModHTMLOverview.TempFolderItem)
end if
end if

#else
//mac we can load the source in one line of code.
me.LoadPage(fullHTML,ModHTMLOverview.TempFolderItem)
#endif
[/code]

This wasn’t a good use of 3 hours of time.

Checkbox has images that should work
And we dont do a reload BUT we do write the pages to disk

Yep those images work. Must be a bug with not writing to disk. I’ll try to file a bug report about this soon.

This looks so good, Maybe help for store a Picture displayed when I Load a webpage