[Lazarus] SynEdit free my TSynCompletion when freed

Martin lazarus at mfriebe.de
Sat Mar 3 14:29:42 CET 2012


On 03/03/2012 12:59, Zaher Dirkey wrote:
> Hi i have global TSynCompletion for muliple synedit, i created it like 
> this
>
>   FCompletion := TSynCompletion.Create(nil);
>   FCompletion.Width := 340;
>   FCompletion.EndOfTokenChr := '{}()[].<>/\:!$&*+-=%';
>   FCompletion.OnExecute := @OnExecuteCompletion;
>   FCompletion.ShortCut := scCtrl + VK_SPACE;
>   FCompletion.CaseSensitive := False;
>   FCompletion.AddEditor(vSynEdit);
>
> But when free the TSynEdit component it free that global FCompletion, 
> how can resolve it?

Create the SynCompletion with an owner. Any owner will do.







More information about the Lazarus mailing list