Re-uniting the several discussion threads...
Hi Phil,
Sorry for me being confused
.
My long-time goal is doing embedded applications with Lazarus/Linux for processor boards without any GUI-hardware/GUI-framework, and porting existing Delphi applications to that target.
For these, I'd like to provide a Web-interface in a way as similar to the GUI of Delphi-applications as possible. Here I of course need a “free running” application, that can use Timers, TCP/IP, serial connections, etc ”in the background”, while no Browser is accessing the “Web-GUI”. Moreover, if a Browser is “connected” (i.e. showing a page of the “Web-GUI”), state changes introduced by the background tasks or by other Browser sessions, need to be reflected on the “Web-GUI” by updating the appropriate controls.
When I found ExtP, I was happy to see that there are tools that might be able to help me with that. The examples I found (on the ExtPascal Website), especially the “Progress-Bar” looked encouraging, as it seems to show the state of a running background process in realtime on the “Web-GUI”.
Now I looked into the source-code of the Progress-Bar example and found that it in fact is a fake: the continuous state changes are done by a Java script thingy running in the browser and not by a background processes on the server displaying it's state in realtime.
I never tried ExtPascal without ExtP. In fact in the beginning I thought that ExtPascal is just a part of ExtP and not decently usable without it. (That is why I had not choice but pestering you with my silly questions.)
I understand that I need to try to create an application with ExtPascal without using ExtP to understand what is happening there (e.g. if/how it's possible to communicate application states in realtime towards the browser without user interaction.)
Regarding the “Background work” in the FastCGI-application, I (fooled by the “Progress-Bar” example that I erroneously thought would be have been done with ExtP and erroneously thought would not be a fake) hoped that ExtP (which I found does not need the VCL/LCL binding) would implement a MainThread and a message queue in it's TApplication workalike. Now I know that it does not, but uses the TFCGIApplication (in FCGIapp.pas) or the TIdExtApplication (in IdExtHTTPServer) provided by ExtPascal, that both seemingly can't do that.
Do you know if/how ExtPascal can be used with a project based on the normal TApplication provided by the Delphi-VCL / Lazarus-LCL so that I can test what happens when a “Mainthread” is working in the background ? If that in fact does work and transferring application states into the browser GUI (see above) is possible, I might be inclined/able to rework TFCGIApplication and/or TIdExtApplication in a way according to the MSEGUI's “TNonGUIApplication” to enable event driven background MainThread programming with an ExtPascal WebGUI without VCL/LCL-binding.
So while seemingly not yet being the solution for the problems I face, maybe ExtP and ExtPascal are an excellent base to built this on (and feed back these option that additionally could be enabled into open source)....
This is Ext JS, not VCL/LCL. Use the appropriate properties.
Of course. But seemingly the goal of EXTP is to make ExtPascal (and thus ExtJS) more usable for educated Delphi/Lazarus/VCL/LCL users, by allowing them to use their beloved IDE to design a "Browser-GUI".
That's not the goal of ExtPascal. And one goal of the ExtP Toolkit is to use the ExtPascal properties as much as possible.
Yep, and this is GREAT and seems to work for the cases is meant for. But nonetheless IMHO it would be even greater it ExtP would preserve the functions of the well known VCL/LCL properties within the re-created work-alike classes as far as possible (such as Tbutton.Caption). This seemingly is not really hard to do (as I proved in my previous mail), but maybe it colud be a lot of work, regarding all the properties that we might want to handle.
Have you looked at the multiselect_example?
It does not compile with "WebServer" enabled ("Error: identifier idents no member Queries" in line 75, seemingly "CurrentThread.Queries"). It does compile without WebServer, but I can't test this yet, as I did not yet install a FastCGI enabled web server.
I commented out line 75 and now it compiles and it does work,
(Only after each Button click it additionally displays an error message "you must select an item. That seems to be caused by commenting out the offending line.)
(Some minutes later: I easily could add the property Queries to TIdExtHTTPServer.
)
Nonetheless: I don't see why the Checkbox.Checked should not be able to be made work in a "normal" way by doing the "query" thingy in the appropriate class with a GetChecked function.
... But I can't find out what string to use in "Query" to get the checked state....
Seemingly in the multiselect example this is done by ExtUxFormMultiSelect1, but if I try to follow the example with my project, creating the appropriate "on" event, I get an error message "Access violation", when I load the form iin the browser. IMHO, no wonder as ExtUxFormMultiSelect1 never is created, But I don't find such a create in the multiselect example, either.
Thanks a lot for your work and your patience !!!
-Michael