Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-29 Thread Joost van der Sluis
Op maandag 29-06-2009 om 16:43 uur [tijdzone +0200], schreef Vincent Snijders: Joost van der Sluis schreef: But it would be nice if I could use LResources again, without using forms, but that's another story. I took a quick look, but i don't see how adding LResources add a dependency

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-29 Thread Mattias Gaertner
On Mon, 29 Jun 2009 16:59:23 +0200 Joost van der Sluis jo...@cnoc.nl wrote: Op maandag 29-06-2009 om 16:43 uur [tijdzone +0200], schreef Vincent Snijders: Joost van der Sluis schreef: But it would be nice if I could use LResources again, without using forms, but that's another

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-29 Thread Joost van der Sluis
Op maandag 29-06-2009 om 17:12 uur [tijdzone +0200], schreef Mattias Gaertner: On Mon, 29 Jun 2009 16:24:47 +0200 Joost van der Sluis jo...@cnoc.nl wrote: And this is what I don't understand. What part of unit forms is needed that does not require the widgetset? LResources. That's

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-29 Thread Joost van der Sluis
Op maandag 29-06-2009 om 17:17 uur [tijdzone +0200], schreef Mattias Gaertner: On Mon, 29 Jun 2009 16:59:23 +0200 Joost van der Sluis jo...@cnoc.nl wrote: Op maandag 29-06-2009 om 16:43 uur [tijdzone +0200], schreef Vincent Snijders: Joost van der Sluis schreef: But it would be

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-21 Thread Martin Schreiber
On Saturday 20 June 2009 16:11:12 Martin Friebe wrote: The best way to avoid it, is or the author of the program only to use units that do not instantiate an application, other than the one(s) needed. MSEgui has tapplication and tguiapplication which both inherit from tcustomapplication.

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-21 Thread Michael Van Canneyt
On Sun, 21 Jun 2009, Graeme Geldenhuys wrote: 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

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-21 Thread Graeme Geldenhuys
Martin Friebe wrote: True, but not the point, sorry. I know and understood that. I just wanted to make it clear that by pulling in gui units into a CGI (non-gui) application is not a good idea. So the question I was raising was: Is forcefully avoiding any multi-app scenario the right

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-21 Thread Mattias Gaertner
On Sun, 21 Jun 2009 22:26:15 +0100 Martin Friebe laza...@mfriebe.de wrote: [...] The beginning of this thread was, that 2 applications existed, because the developer was *forced* to included interfaces: Jost wrote in the initial mail of this thread: I always thought that an application

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-21 Thread Hans-Peter Diettrich
Martin Friebe schrieb: The problem was started due to being forced to use a unit, that the developer didn't want. IMHO this must be solved, the rest is responsibility of the developer. Other compilers have apptype specific startup code. The same could be achived by a global $define, e.g.

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-20 Thread Martin Friebe
Joost van der Sluis wrote: Hi all, I always thought that an application always had one Application-instance from the TCustomAppliction class. But at this moment this is not the case for fcl-web applications, or daemon-applications which are using Lazarus-forms. Take for example the fpcgi unit

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-19 Thread Joost van der Sluis
Op donderdag 18-06-2009 om 21:56 uur [tijdzone +0200], schreef Hans-Peter Diettrich: Joost van der Sluis schrieb: Same in Delphi I know, but can't we come up with a better design? I have service and forms application in same exe file, so i have 2 application in same instance.

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-19 Thread Hans-Peter Diettrich
Joost van der Sluis schrieb: We also could create a true Pascal singleton, in an Application.pp unit. I'll leave that to the framework-developers. I'll simply add the global variable. Then Lazarus could make a Application.pp unit. And I'll add them for the different daemon and fcl-web

[Lazarus] Some thoughts about the global 'Application' instance.

2009-06-18 Thread Joost van der Sluis
Hi all, I always thought that an application always had one Application-instance from the TCustomAppliction class. But at this moment this is not the case for fcl-web applications, or daemon-applications which are using Lazarus-forms. Take for example the fpcgi unit from fcl-web. (not the old

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-18 Thread Joost van der Sluis
Op donderdag 18-06-2009 om 16:11 uur [tijdzone +0200], schreef Zaher Dirkey: Same in Delphi I know, but can't we come up with a better design? I have service and forms application in same exe file, so i have 2 application in same instance. Joost. --

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-18 Thread Zaher Dirkey
Which doesn't make it correct. I Agree, but CustApp.pp belong to FPC team. If it is done, i will like it, because i can create my custom application class then add my special properties. -- Zaher Dirkey -- ___ Lazarus mailing list

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-18 Thread Michael Van Canneyt
On Thu, 18 Jun 2009, Joost van der Sluis wrote: Hi all, I always thought that an application always had one Application-instance from the TCustomAppliction class. But at this moment this is not the case for fcl-web applications, or daemon-applications which are using Lazarus-forms. Take for

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-18 Thread Graeme Geldenhuys
Zaher Dirkey wrote: Which doesn't make it correct. I Agree, but CustApp.pp belong to FPC team. Doesn't matter. There are many FPC developers amongst us. FPCUnit is another console type project which is part of FPC, but Lazarus simply slapped a GUI onto it. :-) Regards, - Graeme -

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-18 Thread Zaher Dirkey
or default initialization function Application: TApplication; begin if CustomApplication = nil then CustomApplication := TApplication.Create; Result := CustomApplication as TApplication; end; -- Zaher Dirkey -- ___ Lazarus mailing list

Re: [Lazarus] Some thoughts about the global 'Application' instance.

2009-06-18 Thread Hans-Peter Diettrich
Joost van der Sluis schrieb: Same in Delphi I know, but can't we come up with a better design? I have service and forms application in same exe file, so i have 2 application in same instance. In a redesign we also should consider the different handling of consol applications with GUI on