Incbin HTML for HtmlView possible?
BlitzMax Forums/MaxGUI Module/Incbin HTML for HtmlView possible?
| ||
Can the htmlview be made to accept incbin'ed html documents, or is there another way to bundle html and images with my exe? The below code works great for Mac and even allows images to be bundles with the html file. Is there a similar solution for a Windows exe? (I'm trying to avoid saving to a temporary file) Import MaxGui.Drivers SuperStrict Local MacAppName:String[] = AppFile[1+AppDir.length..].Split("/") Local htmlfile:String = AppDir$ + "/"+ MacAppName[0] + "/Contents/Data/index.html" Local window:TGadget Local htmlview:TGadget window=CreateWindow("My Window",30,20,600,440,,15|WINDOW_ACCEPTFILES) htmlview=CreateHTMLView(0,0,ClientWidth(window),ClientHeight(window),window) SetGadgetLayout htmlview,1,1,1,1 HtmlViewGo htmlview,htmlfile While WaitEvent() Print CurrentEvent.ToString() Select EventID() Case EVENT_WINDOWCLOSE End End Select Wend Last edited 2010 |
| ||
I thought there was a way to provide the data for the HTML view (rather than just the URL) but perhaps I'm getting it confused with another language/platform/etc. (been bouncing around a lot recently). Failing that I think your best bet is to dump your incbin to a temp file, direct there and delete when you're done, as ugly as that is... Or perhaps make your own extension of the HTMLView gadget that can accept inbin addresses and unpack them itself... not sure how hard this would be... |