How to enable AutoCompletion

Hello,



TScrPascalMemoStyler has predefined AutoCompletion list (ShowMessage, MessageDlg). Please explain this property.

I define class with Scripter.DefineClassByRTTI(). How to enable AutoCompletion for this class in ScrMemo?



TIA and best regards

To simplify:

...

    ScrPascalMemoStyler: TScrPascalMemoStyler;

    Scripter: TatPascalScripter;

    ScrMemo: TScrMemo;

...

type

    TTest = class

        procedure Foo(const AMsg: string);

    end;



procedure TTest.Foo(const AMsg: string);

begin

    ShowMessage(AMsg);

end;

...

    Scripter.DefineClassByRTTI(TTest);

...

What must I do to enable AutoCompletion in ScrMemo? Simple example please.                  

The easiest way is to use TIDEEngine to integrate TIDEMemo (the editor) and TIDEScripter (the object which holds information about the classes) together. 


Drop a TIDEEngine, TIDEScripter and TIDEMemo in the form, connect the engine to the scripter and the memo through the Scripter and Memo properties, and then just initialize it this way:


  IDEEngine1.NewProject;
  IDEEngine1.NewUnit(TScriptLanguage.slPascal);


This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.