Hi, not sure if this should be posted under LCL or MacOSX. But here goes-
Under OSX (but not Linux or Windows) a MenuItem belonging to a PopupMenu associated with a TrayIcon cannot be updated at run time. Easy to reproduce -
On a clean form, drop a TrayIcon, a PopupMenu and, for logging, a TMemo. Set the trayicon's popupmenu property to the popupmenu, add a menu item to the popupmenu. Show the trayicon (with OnShow or a button) and add a button that does this -
procedure TForm1.Button1.Click(Sender: TObject);
begin
MenuItem1.Caption := 'I changed this';
Memo1.Append(MenuItem1.caption);
end;
You will see what you expect in the memo, "I changed this" but click the TrayIcon and the menu text displayed is still "MenuItem1". The caption itself is being changed but apparently noone is telling the PopupMenu. Changing caption at design time works perfectly.
This all works fine under Windows and Linux. Is there any reason why I should not log it as a bug ? Under Lazarus Packages ?
Lazarus 1.8RC4, Mac OSX Sierra.
David