Board logo

Subject: Delphi2006 OTA问题2 [Print This Page]

Author: littlerain    Time: 2005-12-18 00:05     Subject: Delphi2006 OTA问题2

我现在的Code Completion的快捷键已经绑定到alt+space, 用以下方法绑定:
BindingServices.AddKeyBinding([ShortCut(VK_SPACE, [ssAlt])],
CodeCompletion, Pointer(csCodeList or csManual));

现在我在IDE中新建一个application
代码如下:

unit Unit3;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm3 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}

procedure TFor|

end.

这里'|'是我光标所在的位置,当我用alt+space 激活Code Completion窗口后,
回车一下,本来正常的话,应该是TForm3|,但是奇怪的是代码变成了如下:

unit Unit3;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm3 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3;
begin     ~~~~~~~~

end;

end.

奇怪吧?我想也有可能是IDE的bug。
Author: littlerain    Time: 2005-12-20 13:03

应该是Block Completion的bug, 没有适当进行判断,已经将这个bug报告给borland




Welcome to CnPack Forum (http://bbs.cnpack.org/) Powered by Discuz! 5.0.0