Occurs when method property editor requests designer for possible method names.
property OnGetMethodNames: TGetMethodNamesEvent;
Write this handler to specify possible procedure names that can be assigned to the selected in object inspector event.
Use TypeData to filter possible procedures, for example, by procedure parameters. Call Proc for each possible procedure.
This event is intended for integration with external script engines.
This example shows using of the event. EControl Syntax Editor SDK is used as source code analyzer
procedure TForm4.zFormDesigner1GetMethodNames(Sender: TObject; TypeData: PTypeData; Proc: TGetStrProc); var i: integer; R: TTagBlockCondition; begin with CodeEditor.SyntObj do begin // Looking for all text ranges with rule "function" R := TTagBlockCondition(Owner.BlockRules.ItemByName('function')); if R <> nil then for i := 0 to RangeCount - 1 do if (Ranges[i].Rule = R) then Proc(TagStr[Ranges[i].StartIdx + 1]); // Adds function to procedures list end; end;
Copyright (c) 2004 - 2011 EControl Ltd.. All rights reserved.
|
What do you think about this topic? Send feedback!
|