根據(jù)之前的方法增加中文控件名稱后發(fā)現(xiàn)中文控件名稱IDE代碼提示”Error:identifier not found:“,不能顯示控件的方法/屬性。

解決方法:
打開lazarus\components\codetools\customcodetool.pas
添加紅色代碼部分(lazarus 3.4在第1753行)
// read atom if IsStringConstant then begin CurPos.StartPos:=OldPrePos; if (CurPos.StartPos>1) and (Src[CurPos.StartPos-1] in ['''','`']) then begin ReadStringConstantBackward; end; LastAtoms.AddReverse(CurPos); exit; end; c2:=Src[CurPos.StartPos]; case c2 of 'A'..'Z','a'..'z',#$80..#$FF: begin // identifier or keyword or hexnumber while (CurPos.StartPos>1) do begin if (IsIdentChar[Src[CurPos.StartPos-1]]) then dec(CurPos.StartPos)
重新編譯lazarus后中文控件名稱在IDE代碼提示已能正確顯示控件的方法/屬性等。


浙公網(wǎng)安備 33010602011771號(hào)