[fpc-devel] C style operator doesn't work with properties in 2.3.1
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Jul 17 09:42:05 CEST 2008
On Thu, Jul 17, 2008 at 9:38 AM, Graeme Geldenhuys
<graemeg.lists at gmail.com> wrote:
> At least FPC with mode objfpc had the common sense NOT to allow the
> following (which I believe is still allowed in Delphi). Also tooltip
> evaluation/debugging doesn't work with 'with' statements in Lazarus or
> Delphi.
>
>
> type
> MyClass = class(TObject)
> ...
> public
> property MyName: String .....
> end;
>
> procedure MyClass.Foobar;
> var
> MyName: string;
> begin
> with self do
> begin
> MyName := 'hello'; // Are we using e local var MyName or MyClass.MyName??
> end;
> end;
BTW:
I know that's a horrible example, but I think you get my point
regarding the MyName variable/field. :-)
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-devel
mailing list