Hi,

Using Code Completion (pressing Ctrl-Space) in the interface section
of a class, so I can override a method, formats the code incorrectly.
I have Lazarus's "CodeTools Options -> Space tab" setup to not include
any spaces in front of elements. No checkboxes are checked in the
"Insert space in front of" groupbox.


Problem #1:
This is how the original class has it's method defined. Notice that
there is no spaces in front of the colons and semi-colons.

public
 function    IsValid(const AErrors: TtiObjectErrors): boolean;
overload; virtual;


And this is how code completion inserts that method into a new class
where I am trying to override the method.  Notice the formatting is
different, it has spaces in front of the identifiers, colons and
semi-colons.

public
   function IsValid ( const AErrors : TtiObjectErrors ) : boolean ;
overload ; virtual ;


Problem #2:
Another problems, is that it doesn't put the 'override' keyword at the end!


Problem #3:
This is more a nice-to-have feature.  When I use the code completion
in the new class as show above, it inserts the code at the cursor
location, even if I am in the "private" or "protected" section of the
class. I think it could be more intelligent and know that the
overridden method must go into the same section as it was originally
defined, in this case the "public" section.


--
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to