Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Code Completion    [ Add a report in this area ]  
Report #:  93528   Status: Open
Code Completion doesn't work on class vars
Project:  Delphi Build #:  15.0.3953.35171
Version:    15.1 Submitted By:   Dalija Prasnikar
Report Type:  Basic functionality failure Date Reported:  5/3/2011 5:25:58 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   282959
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 6
Description
Code Completion will not show class vars inside class methods, constructors and destructors
Steps to Reproduce:
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  TMyClass = class
  protected
    class var fMyObject: TObject;
    class constructor ClassCreate;
    class destructor ClassDestroy;
  public
    class procedure DoSomething; static;
    class property MyObject: TObject read fMyObject;
  end;

{ TMyClass }

class constructor TMyClass.ClassCreate;
begin
  fMy  // Code Completion doesn't show fMyObject
//  fMyObject := TObject.Create;
end;

class destructor TMyClass.ClassDestroy;
begin
  fMyObject.Free;
end;

class procedure TMyClass.DoSomething;
begin
  fMy // Code Completion doesn't show fMyObject
end;

begin
  writeln(TMyClass.MyObject.ClassName);
  readln;
end.
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01