Re: [fpc-pascal] UML state machine drawing tool

2006-12-08 Thread Marc Santhoff
Am Freitag, den 08.12.2006, 21:40 +0100 schrieb Michael Van Canneyt: > > On Fri, 8 Dec 2006, Marc Santhoff wrote: > > > Hi, > > > > is anyone aware of a UML tool capable of making class diagrams and state > > diagrams and emitting fpc compilable pascal code (or at least being > > configurable to

Re: [fpc-pascal] UML state machine drawing tool

2006-12-08 Thread Marc Santhoff
Am Freitag, den 08.12.2006, 19:05 -0200 schrieb Felipe Monteiro de Carvalho: > On 12/8/06, Marc Santhoff <[EMAIL PROTECTED]> wrote: > > is anyone aware of a UML tool capable of making class diagrams and state > > diagrams and emitting fpc compilable pascal code (or at least being > > configurable t

[fpc-pascal] GetEpochTime not found

2006-12-08 Thread Marc Santhoff
Hi, I've got some funny problem here. The program compiled well with fpc up to version 1.9.4. I haven't touched it for a while and now it fails with fpc 2.0.2. The source snippet in queston is: function TStorable.generateID: integer; begin //writeln(GetEpochTime); does not work anymore result :=

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Dean Zobec
>> Try this. >> http://bdn.borland.com/article/22576 NewInstance/FreeInstance is what I would have recommended as well. > Maybe we should include an implementation in FPC by default ? How ? The article works as-is AFAIK. Btw, I think singletons are nonsense too. Why is a global variable evil,

Re: [fpc-pascal] UML state machine drawing tool

2006-12-08 Thread Felipe Monteiro de Carvalho
On 12/8/06, Marc Santhoff <[EMAIL PROTECTED]> wrote: is anyone aware of a UML tool capable of making class diagrams and state diagrams and emitting fpc compilable pascal code (or at least being configurable to do so)? I did a quick search and found this: http://www.modelmakertools.com/modelmak

Re: [fpc-pascal] UML state machine drawing tool

2006-12-08 Thread Michael Van Canneyt
On Fri, 8 Dec 2006, Marc Santhoff wrote: > Hi, > > is anyone aware of a UML tool capable of making class diagrams and state > diagrams and emitting fpc compilable pascal code (or at least being > configurable to do so)? I think Umbrello (part of KDE) can do this. It can save everything as XML,

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Micha Nelissen
Daniël Mantione wrote: > > Op Fri, 8 Dec 2006, schreef Micha Nelissen: > >> Btw, I think singletons are nonsense too. Why is a global variable evil, >> and a singleton class not ? > > Well, a singleton can hide and/or protect its private data. Not more than a global variable of the same class t

[fpc-pascal] UML state machine drawing tool

2006-12-08 Thread Marc Santhoff
Hi, is anyone aware of a UML tool capable of making class diagrams and state diagrams and emitting fpc compilable pascal code (or at least being configurable to do so)? TIA, Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Daniël Mantione
Op Fri, 8 Dec 2006, schreef Micha Nelissen: > Btw, I think singletons are nonsense too. Why is a global variable evil, > and a singleton class not ? Well, a singleton can hide and/or protect its private data. Actually, a unit is a singleton. The procedures are the methodes, the interface decl

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Micha Nelissen
Michael Van Canneyt wrote: >> Try this. >> http://bdn.borland.com/article/22576 NewInstance/FreeInstance is what I would have recommended as well. > Maybe we should include an implementation in FPC by default ? How ? The article works as-is AFAIK. Btw, I think singletons are nonsense too. Why i

[fpc-pascal] RE: [lazarus] Article on Pixel.

2006-12-08 Thread Michael Van Canneyt
On Fri, 8 Dec 2006, George Birbilis wrote: > > The latest issue of Linux Journal features an article about > > Pixel (By Pavel Kanzelsberger). > > It gives it a very good comment. Pity it's not mentioned that > > it's written using FPC. > > (the article is written by a writer/publisher, not a pr

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Marc Santhoff
Am Freitag, den 08.12.2006, 10:50 +0200 schrieb Graeme Geldenhuys: > Bottom line: How can we hide the constructor of a class? As far as I > can see you cannot decrease the visibility of a method compared to > it's inherited class. Why shouldn't we be allowed to? C++, C# does! > > I found this by

Re: [fpc-pascal] Good revision on wince cross-compiler

2006-12-08 Thread TOndrej
On 12/8/06, Felipe Monteiro de Carvalho <[EMAIL PROTECTED]> wrote: Does anyone know a good revision that works with Lazarus-WinCE? A few weeks ago I experimented and found out that fpc 5389 and Lazarus 10204 worked for me on arm-wince. I'm sticking to these revisions for the time being, making

Re: [fpc-pascal] Good revision on wince cross-compiler

2006-12-08 Thread Gabor Boros
Hi, 5191 works very well for me. Gabor ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Good revision on wince cross-compiler

2006-12-08 Thread Felipe Monteiro de Carvalho
Hello, I was testing fpc revisions for wince, based on the page: http://www.freepascal.org/wiki/index.php/Tested_Unstable_Revisions I first tryed 5431, but it doesn´t compile correctly. Next I tryed 5370. Everything compiles fine, but when I tested a hello world lazarus application it runs, but

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Andreas Berger
Graeme Geldenhuys wrote: On 12/8/06, TOndrej <[EMAIL PROTECTED]> wrote: On 12/8/06, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > I still don't know why we can't decrease visibility in Free Pascal. > Is there some internal language design that prevents it? A class definition (or at least its

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Michael Van Canneyt
On Fri, 8 Dec 2006, Steve Williams wrote: > > I found this by trying to implement a True Singleton in Free Pascal / > > Delphi. For those that don't know, a Singleton is a Design Pattern > > that allows only one instance of a class. It seems it is impossible > > to do in Free Pascal / Delphi.

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease thevisibility of a method?

2006-12-08 Thread Matt Emson
> On 8 dec 2006, at 10:55, Graeme Geldenhuys wrote: > > > I still don't know why we can't decrease visibility in Free Pascal. > > Is there some internal language design that prevents it? > > At least Borland explicitly says you cannot do that: >http://info.borland.com/techpubs/delphi/delphi5/

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Steve Williams
> I found this by trying to implement a True Singleton in Free Pascal / > Delphi. For those that don't know, a Singleton is a Design Pattern > that allows only one instance of a class. It seems it is impossible > to do in Free Pascal / Delphi. :-( Try this. http://bdn.borland.com/article/22576

[fpc-pascal] Article on Pixel.

2006-12-08 Thread Michael Van Canneyt
Hi, The latest issue of Linux Journal features an article about Pixel (By Pavel Kanzelsberger). It gives it a very good comment. Pity it's not mentioned that it's written using FPC. (the article is written by a writer/publisher, not a programmer). For the Lazarus users: Pixel is written using a

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread TOndrej
> I'm not even sure if there is a language which allows demoting > visibility of inherited class members. It would seem odd to me. Just > my 2c, of course. ;-) C++, C#, VB.Net are three I know of. I think Java also allows it. In these languages, AFAIK, it's allowed, the compiler generates a wa

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Jonas Maebe
On 8 dec 2006, at 14:03, Graeme Geldenhuys wrote: There is a lot of things in life we shouldn't do, but we do. :-) At least give us the choice, maybe via a compiler directive and keep the compiler warning in place. That way we can use it responsibly when required, This is a generic argument

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Vincent Snijders
Graeme Geldenhuys schreef: On 12/8/06, Jonas Maebe <[EMAIL PROTECTED]> wrote: Quote: "You should not change the access modifier for inherited members." So it's possible but discouraged, and they give warnings (and sometimes errors) for it with the recommendation "Do not exclude a warning from

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Graeme Geldenhuys
On 12/8/06, Jonas Maebe <[EMAIL PROTECTED]> wrote: Quote: "You should not change the access modifier for inherited members." So it's possible but discouraged, and they give warnings (and sometimes errors) for it with the recommendation "Do not exclude a warning from this rule." There is a lot

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Jonas Maebe
On 8 dec 2006, at 13:44, Graeme Geldenhuys wrote: I'm not even sure if there is a language which allows demoting visibility of inherited class members. It would seem odd to me. Just my 2c, of course. ;-) C++, C#, VB.Net are three I know of. http://msdn2.microsoft.com/en-us/library/ms182332(

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Graeme Geldenhuys
On 12/8/06, TOndrej <[EMAIL PROTECTED]> wrote: On 12/8/06, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > I still don't know why we can't decrease visibility in Free Pascal. > Is there some internal language design that prevents it? A class definition (or at least its parts visible from outside)

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread TOndrej
On 12/8/06, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: I still don't know why we can't decrease visibility in Free Pascal. Is there some internal language design that prevents it? A class definition (or at least its parts visible from outside) can be understood as a kind of contract. If you h

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Jonas Maebe
On 8 dec 2006, at 10:55, Graeme Geldenhuys wrote: I still don't know why we can't decrease visibility in Free Pascal. Is there some internal language design that prevents it? At least Borland explicitly says you cannot do that: http://info.borland.com/techpubs/delphi/delphi5/oplg/classes.h

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Graeme Geldenhuys
On 12/8/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: I think the solution is to create a public constructor which throws an NotImplemented exception or something like that. Ok, that works, or at least stops a developer from trying to create a instance directly. In the exception message, I m

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Vincent Snijders
Graeme Geldenhuys schreef: On 12/8/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: Maybe I am analyzing your output wrong, but to me it seems as if the contructor of TObject is called in the third case. printdata seems to print an empty text. So the protected contructor is unreachable, but th

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Graeme Geldenhuys
On 12/8/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: Maybe I am analyzing your output wrong, but to me it seems as if the contructor of TObject is called in the third case. printdata seems to print an empty text. So the protected contructor is unreachable, but the public constructor in TObj

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Vincent Snijders
Graeme Geldenhuys schreef: Bottom line: How can we hide the constructor of a class? As far as I can see you cannot decrease the visibility of a method compared to it's inherited class. Why shouldn't we be allowed to? C++, C# does! I found this by trying to implement a True Singleton in Free Pa

[fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Graeme Geldenhuys
Bottom line: How can we hide the constructor of a class? As far as I can see you cannot decrease the visibility of a method compared to it's inherited class. Why shouldn't we be allowed to? C++, C# does! I found this by trying to implement a True Singleton in Free Pascal / Delphi. For those th

Re: [fpc-pascal] charset conversion

2006-12-08 Thread Leducq Dominique
Lot of thanks to alll for your answers ! I'll now try to make best use of them. Dominique. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal