[Lazarus] Problem with syncompletion.pas

Martin lazarus at mfriebe.de
Mon Aug 3 18:58:26 CEST 2009


Zaher Dirkey wrote:
> syncompletion.pas in synedit component
>
> 1 -
> in TSynBaseCompletionForm class
>
> What for
>
> FAnsi: boolean;
> property ffAnsi: boolean read fansi write fansi;
>
> 2 -same for TSynBaseCompletion
>
>     RFAnsi: boolean;
>     SFAnsi: boolean;
>
>     property AnsiStrings: boolean read SFAnsi write RFAnsi;
>
> If not used i made some modification on it (removed that variables and
> add CaseSensitive to it)
>
> Can i send the patch
>   
You are right, in there current form, they make little sense.
They are the left over from a basic latin1/ansi only CaseSensitive flag.

RFAnsi/SFAns used to forward the setting from Completion to the Form 
(that got broken in 2002)

I think I will  replace it by a CaseSensitive (utf8 based) option?
Thanks for pointing this out, anyway.

Before this can be fixed, the below needs to be fixed, otherwise it will 
be hard to test it.

> 3 - The Auto Complete in TSynCompletion not worked fine with me, it is
> just 2 char and then stop search for the keyword, after that pressing
> Enter not close the AutoComplete
>
> --------
> procedure TMainForm.LoadCompletion;
>   procedure FillNow(Name: string; SchemaItems: TmncSchemaItems);
>   var
>     i: Integer;
>   begin
>     for i := 0 to SchemaItems.Count - 1 do
>       Completion.ItemList.Add(SchemaItems[i].Name);
>   end;
> begin
>   //Completion.AddEditor(SQLEdit);
>   Completion.Editor := SQLEdit;
>   Completion.EndOfTokenChr := Completion.EndOfTokenChr + #13;
>   Completion.TheForm.Font.Assign(SQLEdit.Font);
>   //Completion.CaseSensitive := True;
>   EnumerateKeywords(Ord(tkDatatype), SqliteTypes, SQLEdit.IdentChars,
> @DoAddKeyword);
>   FillNow('Table', sqlvEngine.Session.Tables);
>   
Just tried this, you are right it doesn't seem to work at all. probably 
buggy. You can report it on mantis, so it wont be forgotten.

Thing is the IDE uses it's own code to do this, search ccComplet in 
SourceEditor.pp if interested









More information about the Lazarus mailing list