Die Templatevariante von Bernd Geyser ist auch meine übliche Variante, wenn Du's unbedingt abstakt haben willst
Delphi-Quellcode:
unit Unit2;
interface
uses Menus,Dialogs;
type
TStubClass=Class
CLASS Procedure AllgPopup(Sender:TObject);
Public
End;
implementation
{ TStubClass }
Class procedure TStubClass.AllgPopup(Sender: TObject);
begin
Showmessage(TPopupMenu(Sender).Popupcomponent.
Name)
end;
end.
mit:
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
Popupmenu1.OnPopup := TStubClass.AllgPopup;
end;