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
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:
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
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 of
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 this
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
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
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
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
--
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:
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
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
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
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
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 type ?
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,
I
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:
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,
and
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
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 do so)?
20 matches
Mail list logo