Recent

Author Topic: IDE problem with inherited subclasses  (Read 3287 times)

HomePlaneR

  • New Member
  • *
  • Posts: 34
IDE problem with inherited subclasses
« on: February 05, 2013, 12:59:00 pm »
Hi everyone,

I've got a particular issue with IDE.

I have a base class and a sub-class in it (TBaseClass and TBaseSubClass in code sample below). Afterwards I add a new class derived from the base one (TCustomClass). I customize as well the sub class (TCustomSubClass). The problem is that Lazarus IDE refuse to admit the last one derived class: when I do something in its customized method, I get errors "identifier not found: TBaseSubClass" from code tools. On each Ctrl+Space hit the cursor goes to the interface section where TCustomSubClass is described. And it is quite annoying: I hit it each two seconds, so the developing of these methods becomes terrible.

Code sample:

Code: [Select]
type
  TBaseClass = class
   public type
    TBaseSubClass = class
      procedure DoSomething; virtual;
    end;
  end;

  TCustomClass = class (TBaseClass)
   public type
    TCustomSubClass = class (TBaseSubClass)
     procedure DoSomething; override;
    end;
  end;

{ TCustomClass.TCustomSubClass }

procedure TCustomClass.TCustomSubClass.DoSomething;
begin
 //put the cursor here and hit Ctrl+Space
end;

{ TBaseClass.TBaseSubClass }

procedure TBaseClass.TBaseSubClass.DoSomething;
begin
end;

begin
end.                       

I know that this issue is quite particular, but anyway could I hope to have it fixed in following releases or what I can do to fix it myself? I use Lazarus 1.0.6 (latest release on the main page), Win7 64 bit. The FPC version is 2.6.0, the compiler goes well with this kind of things in code.

Thanks!

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: IDE problem with inherited subclasses
« Reply #1 on: February 05, 2013, 01:17:58 pm »
I can reproduce with Laz. 1.1.
Autocomplete probably still cannot handle the nested classes well (but code is compilable).
IMO you should report it and attach this demo.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

HomePlaneR

  • New Member
  • *
  • Posts: 34
Re: IDE problem with inherited subclasses
« Reply #2 on: February 05, 2013, 01:52:34 pm »
I can reproduce with Laz. 1.1.
Autocomplete probably still cannot handle the nested classes well (but code is compilable).
IMO you should report it and attach this demo.

Done, http://bugs.freepascal.org/view.php?id=23831

HomePlaneR

  • New Member
  • *
  • Posts: 34
Re: IDE problem with inherited subclasses
« Reply #3 on: February 07, 2013, 11:06:02 am »
Well, as I see in bugracker, the issue is fixed in revision #40201.

I've just tested it with snapshot of today for Win64, it works.

Thanks!
« Last Edit: February 07, 2013, 12:31:17 pm by HomePlaneR »

 

TinyPortal © 2005-2018