In a Delphi 2010 library, I need to dynamically create a popupmenu (this part is fine), associate it with a control (also fine I think), and associate the created menu items with an OnClickEvent back in the calling program (this is the problem). I have a procedure that simplified is like this:
This creates the menu and associates the procedure with the OnClick events for the created menu items. I try to call this with something like:
(MyMenu is an instance of TMyMenu, and object I created with various stuff needed for the menu to work.) When I compile, I get "Incompatible types: 'regular procedure and method pointer'". Need guidance on passing the procedure. Need guidance on how to correctly pass the procedure. Thanks.