Cocoa: popNotifier.ShowAtPos does not show notification
Original Reporter info from Mantis: crlab @neurolabusc1
-
Reporter name: Chris Rorden
Original Reporter info from Mantis: crlab @neurolabusc1
- Reporter name: Chris Rorden
Description:
The TPopupNotifier does not appear to work for Cocoa.
Steps to reproduce:
procedure TForm1.PopUpMsg();
var
popNOtifier: TPopupNotifier;
begin
popNotifier:=TPopupNotifier.Create(Self);
popNotifier.Title:='User notification';
popNotifier.Text:='a message';
popNotifier.ShowAtPos(20, 20);
Sleep(5000);
popNOtifier.hide; // this has no effect in Ubuntu
end;
Additional information:
One option might be to use the NSUserNotification, alternatively, NSUserNotification could be added to macosext to provide a convenient but MacOS specific way to briefly show messages that automatically close.
- (IBAction)notifyNotAllVolumesLoaded: (int) loadedVols RawVols: (int) rawVols;
{
NSUserNotification *notification = [[NSUserNotification alloc] init];
notification.title = [NSString stringWithFormat:@"Loaded %d of %d volumes", loadedVols, rawVols];
notification.informativeText = @"Reason: The preference 'Only initial volumes' is selected";
notification.soundName = NULL;
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
[NSTimer scheduledTimerWithTimeInterval: 4.5 target:self selector: @selector(closePopup) userInfo:self repeats:NO];
}
Mantis conversion info:
- Mantis ID: 35688
- OS: Darwin
- OS Build: 10.11.6
- Build: 61326
- Platform: MacBook 2012 Retina 13"
- Version: 2.1 (SVN)