About the author
12 years ago, I did a project and wrote a blog post on enumerating the Delphi 8 IDE menu items.
Recently, I did a new one for the RAD Studio 10 Seattle IDE and RAD Studio 10.1 Berlin IDE. Why did I write one? It's to find out for myself what the IDE menus are, and then, extend it. Why? For too many years, the developers did not want to spend time to fix the issue where the View menu is way too long. I filed a bug, but I guess it was lost in time. A search for it found two similar bugs, QC 92248 and QC 101412.
The binaries are here on Embarcadero's CodeCentral.
Here's before and after for RS10 Seattle, followed by RS10.1 Berlin:
Before:
After:
class procedure TDiscoverMenus.SubMenus(const AMenuItem: TMenuItem); var LChildMenuItem: TMenuItem; begin SL.Add(Format('Name: %s Caption: %s', [AMenuItem.Name, AMenuItem.Caption])); for LChildMenuItem in AMenuItem do begin if LChildMenuItem.Count>0 then SubMenus(LChildMenuItem) else SL.Add(Format('Name: %s Caption: %s', [LChildMenuItem.Name, LChildMenuItem.Caption])); end; end; class procedure TDiscoverMenus.EnumerateMenus; var LMainMenu: TMainMenu; LINTAServices: INTAServices; LMenuItem: TMenuItem; LLine: string; begin if Supports(BorlandIDEServices, INTAServices, LINTAServices) then begin LMainMenu := LINTAServices.MainMenu; SL := TStringList.Create; try for LMenuItem in LMainMenu.Items do SubMenus(LMenuItem); for LLine in SL do OutputDebugString(PChar(LLine)); finally SL.Free; end; end; end;
Here's my attempt:
stackoverflow.com/.../overly-tall-view-dropdown-menu-in-xe2
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.