Open edk24 opened 5 years ago
w.LoadFile("demo9.html")`
HTML paths should be absolute.
w.LoadFile(GetCurrentDirectory() + "/demo9.html")
This should be okay unless you change current directory. Better use executable path:
https://stackoverflow.com/questions/18537257/how-to-get-the-directory-of-the-currently-running-file https://stackoverflow.com/questions/12090170/find-the-path-to-the-executable
that's something that as been introduced in a recent Sciter SDK (at least since the last time I tried Sciter). so most of the examples are not working directly now. not a big deal to solve, but a message on the front readme page about it would be nice for newcomers...
I'll check that, thanks for the notice.
Yes, i encountered this problem too, it was caused by recent Sciter SDK.
Don't use w.LoadFile(), don't use w.LoadFile(), don't use w.LoadFile(). The important thing, say three times.
My code:
`Var page source code html = mold all read files ("layout design.html")// ioutil.ReadFile()
//var page source code html = mold one page source code () / / source code html directly embedded in main.go
/ / Load html, from a string variable w.LoadHtml (page source code html, "")`
不要用w.LoadFile(),不要用w.LoadFile(),不要用w.LoadFile()。 重要的事,说三遍。
我的代码:
` var 页面源代码html = 模具一一全部读取文件("布局设计.html") //GO的 ioutil.ReadFile()
//var 页面源代码html = 模具一一页面源代码()// 源代码html直接 嵌入 main.go中
//加载html,从一个字符串变量中 界面窗口.LoadHtml(页面源代码html, "")`
debug No problem.
if
go build demo9.go
Cannot load FilePC: Linux/deepin
Sorry, I can't speak English. I hope you can understand my expression.