August 30, 2012 at 9:05 pm #737
I am using HTTPServer to do Ajax style calls, which works fine. The issue I have now, is that the basic page I use it just a small HTML file I start directly from it’s location, but I was wondering how I can start the file via HTTPServer. Can HTTPServer also serve static HTML files, that reside in some directory on a server?August 30, 2012 at 9:24 pm #935
There’s nothing built-in to serve static files, but it would be relatively easy to add something.
Another option is to put the static pages in a “book” in the database – that keeps the system more self contained. But it means using Suneido’s book editor whereas you might want to use an external HTML editor.
Currently the “routing” with HtmlMap is quite basic. You would need to do something like add a “file” entry and map it to a function that reads external files, but then the url would have to be /file/…
I think the stdlib HtmlMap had a “Res” entry that mapped to GetBookRes
The other option would be to modify HttpServer e.g. so if the path wasn’t found it would look in some directory.
Hope that helps.August 31, 2012 at 9:06 am #936
I checked HttpMap and noticed the GetCodeRes function. It searches the RES for files. I used that one, and it works nicely. Now I can fetch the HTML, CSS and JS files without having to use local copies of the files. I tested it using FireFox and it works fine. IE is easy, getting it to work under FireFox is something else 😀
I have one more question about using a browser for an application: actually I was using the BrowserControl, because I wanted to use some functions from within Suneido. But it seems to me that the browser uses IE6 (as ActiveX component), and I had some difficult times with CSS and IE6. So I tried FireFox and that works fine. The question now is: can I also use FireFox from within BrowserControl? I understand it should be possible to use ATLAX with other ActiveX components, but I’m not sure this works well for FireFox.August 31, 2012 at 2:41 pm #937
I don’t know if it is possible to use FIrefox (or another browser) as an ActiveX control. It might be but I’ve never tried.
The ability to pass a URL to AtlAxWin is something built-in to Windows. I would hope it would use the latest version of IE, but I don’t know how to control that. You might be able to pass a ProgID or CLSID and specify a particular browser version.
One advantage of using a separate browser (instead of BrowserControl) is that users don’t need to run Suneido, they just need a browser. But that is only relevant in a multi-user situation.
I looked at using Chromium Embedded with Suneido but didn’t finish anything. (See my blog post.)September 1, 2012 at 5:47 pm #938
Yes, working with web technology has its good points and its bad points.November 10, 2012 at 3:54 pm #940
Next thing to explore? I think I will give wxWidgets a shot. I used it with Python before (wxPython), and it seems a good platform independent GUI environment.November 28, 2012 at 7:31 pm #941
Bjoern did some work on wxWidgets although I haven’t heard anything lately. I can forward you our email exchanges if that would be of interest.
Sorry for the slow response, for some reason I did not get an email notification.December 14, 2012 at 7:44 pm #942
Sorry for the bit late reaction. I have checked out RAP in the meantime, but I think it is too heavy. I worked with wxPython before, that seemed ok to me. So for a platform independent client solution, wxWidget bindings are still a good option. You can send me the information if you want. Or do you have any other suggestions for a client?
- You must be logged in to reply to this topic.