Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2012-04

On experience of using class helpers

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexander Klenin

I have used class helpers feature for the first time. (See components/tachart/tachartteechart.pas, r36916). The good news is that I was able to get it working. The bad news is that I have encountered 4 bugs and 1 missing feature in about 10 lines of code :)
(Also, Lazaus does not seem to support class helpers at all.)

I have entered some simpler issues in the tracker:

http://bugs.freepascal.org/view.php?id=21808
http://bugs.freepascal.org/view.php?id=21809
http://bugs.freepascal.org/view.php?id=21810
http://bugs.freepascal.org/view.php?id=21811
http://bugs.freepascal.org/view.php?id=21812

Unfortunately, I also have more subtle problems (run-time crash) which I was yet unable to reproduce on a simple test case.

Generally, class helpers feature is potentially useful, but still not quite ready.

Alexander S. Klenin

Reply by email

Sven Barth
to Alexander Klenin
"Alexander Klenin" wrote 6 lines
I have used class helpers feature for the first time. (See components/tachart/tachartteechart.pas, r36916). The good news is that I was able to get it working. The bad news is that I have encountered 4 bugs and 1 missing feature in about 10 lines of code :)

Why do you need to test so much? Just kidding...
I'm glad that you tested some of the things I didn't test during development.

Show quoted text 6 lines
(Also, Lazaus does not seem to support class helpers at all.) I have entered some simpler issues in the tracker: http://bugs.freepascal.org/view.php?id=21808 http://bugs.freepascal.org/view.php?id=21809

AFAIK Delphi does not support this either, because in the helper's interface you only have access to members of itself or its parents. If I remember correctly I have even tested code similar to yours at that time and it might still be available as a test in the tests directory.

Show quoted text 6 lines
http://bugs.freepascal.org/view.php?id=21810 http://bugs.freepascal.org/view.php?id=21811 http://bugs.freepascal.org/view.php?id=21812 Unfortunately, I also have more subtle problems (run-time crash) which I was yet unable to reproduce on a simple test case.

Would be good if you're able to find reproducable cases.

Regards,
Sven

Reply by email

Alexander Klenin
to Sven Barth
Sven Barth wrote 7 lines
Am 20.04.2012 05:41 schrieb "Alexander Klenin" : > The bad news is that I have encountered 4 bugs and 1 missing feature > in about 10 lines of code :) Why do you need to test so much? Just kidding... I'm glad that you tested some of the things I didn't test during development.

Actually, I did not specifically test --
just tried to write code, it failed, I filed a bug and tried in another way, and so on... :)

Show quoted text 6 lines
> http://bugs.freepascal.org/view.php?id=21809 AFAIK Delphi does not support this either, because in the helper's interface you only have access to members of itself or its parents. If I remember correctly I have even tested code similar to yours at that time and it might still be available as a test in the tests directory.

Maybe, this is why it is a feature request.
Still, I think it is a reasonable one.

> Unfortunately, I also have more subtle problems (run-time crash) > which I was yet unable to reproduce on a simple test case. Would be good if you're able to find reproducable cases.

It is reproducible, just not on a simple case --
see components/tachart/tachartteechart.pas, line 194

Alexander S. Klenin

Reply by email

Jonas Maebe
to Alexander Klenin

Alexander Klenin wrote on Fri, 20 Apr 2012:

Show quoted text 9 lines
>> http://bugs.freepascal.org/view.php?id=21809 > > AFAIK Delphi does not support this either, because in the helper's interface > you only have access to members of itself or its parents. If I remember > correctly I have even tested code similar to yours at that time and it might > still be available as a test in the tests directory. Maybe, this is why it is a feature request. Still, I think it is a reasonable one.

There's an Embarcadero bug report about this, too: http://qc.embarcadero.com/wc/qcmain.aspx?d=95548

Unfortunately, there are no comments yet from Embarcadero people to indicate whether this is intentional because of some not immediately obvious ambiguity or other problem, or whether it's an oversight.

Jonas

Reply by email