[Lazarus] Some thoughts about the global 'Application' instance.
Graeme Geldenhuys
graemeg at opensoft.homeip.net
Sun Jun 21 18:46:51 CEST 2009
Martin Friebe wrote:
>
> Example: I may write a cgi-application (therefore it must have the
> web-fcl CgiApplication, right?), but I want to use this app to report
> the current screen resolution on the Server, so I do want to access the
> Screen object from the forms unit,
As a side note:
CGI applications are actually non-GUI applications. Which also means they can run on for example a Linux server that doesn't have a GUI running or even installed. So including Forms unit or any GUI units for that matter is going to causes that CGI application to fail or report errors on startup anyway because they cannot find the DISPLAY environment variable or open a connection to the running X11 server. I have first hand experience with this and had to rework the core tiOPF framework units to be truly non-gui, at which point my CGI apps and console based unit test suite started working correctly.
Windows users never detect this problem, because you don't get Windows severs without a GUI (though I believe Microsoft is working on such a Server release now).
Regards,
- Graeme -
________________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the Lazarus
mailing list