【发布时间】:2014-10-30 03:37:01
【问题描述】:
当我为 mac OSX 创建通知时。我可以设置通知的(唯一)名称,但标题不会改变。它只显示应用程序的名称。
procedure TPWTrayIcon.MacNotification(pTitle, pMessage: string);
var
Note : TNOtification;
NoteCenter : TNotificationCenter;
begin
NoteCenter:=TNotificationCenter.Create(nil);
try
note := NoteCenter.CreateNotification(pTitle,pMessage,Now+EncodeTime(0,0,1,0));
try
note.AlertAction := 'Alert';
// note.name := pTitle;
// note.AlertBody := pMessage;
// note.FireDate := Now + EncodeTime(0, 0, 1, 0);
NoteCenter.ScheduleNotification(note);
finally
note.DisposeOf;
end
finally
NoteCenter.Free;
end;
【问题讨论】:
标签: macos delphi notifications firemonkey delphi-xe6