I have an app, which has multiple forms. All these forms have a PopupMenu. I build the menu items programatically, all under a common root menu item. I want ALL the menu
This is the difference between a "procedure" and a "procedure of object"
The OnClick is defined as a TNotifyEvent:
OnClick
TNotifyEvent
type TNotifyEvent = procedure(Sender: TObject) of object;
You cannot assign a procedure to the OnClick as it is the wrong type. It needs to be a procedure of object.