About the author
The following code in the unit of a package demonstrates how to iterate the names of the environment options in the Delphi IDE
procedure Register;var LOTAServices: IOTAServices; LEnvironmentOptions: IOTAEnvironmentOptions; LOptionNames: TOTAOptionNameArray; LOptionName: TOTAOptionName; SL: TStringList; LKind, LName, Line: string;begin if Supports(BorlandIDEServices, IOTAServices, LOTAServices) then begin LEnvironmentOptions := LOTAServices.GetEnvironmentOptions; LOptionNames := LEnvironmentOptions.GetOptionNames; SL := TStringList.Create; for LOptionName in LOptionNames do begin LKind := GetEnumName(typeinfo(TTypeKind), Ord(LOptionName.Kind)); LName := LOptionName.Name; Line :=Format('<tr>'#13#10+'<td>%s</td>'#13#10+'<td>%s</td>'#13#10+'</tr>'#13#10, [LName, LKind]); SL.Add(Line); end; SL.Sort; Clipboard.AsText := SL.Text; SL.Free; end;end;
Continued discussion of undocumented Delphi 8 Property Access Specifiers, and other ways of adding and removing delegates / events handlers, including clearing the list of all the delegates / event handlers.
This article discusses the new Delphi 8 property access specifiers.
A method pointer is now the same as a global procedure, ie, procedure of object = procedure.