How can we bounce the dock icon of our application?
+7
A:
You can use the requestUserAttention:
from NSApplication. The NSRequestUserAttentionType
allows you to specify whether the Dock icon will bounce once or until the application is activated.
Laurent Etiemble
2010-01-08 10:42:43
A:
Hi
I tried
[NSApp activateIgnoringOtherApps:YES];
int attentionrequest = [NSApp requestUserAttention:NSCriticalRequest];
and also this
[NSApp requestUserAttention:NSCriticalRequest];
but not works
Amit Battan
2010-01-08 11:28:45
This works only if the application IS NOT activated.
Laurent Etiemble
2010-01-08 11:48:40
A:
Hi All
sorry it works... my focus was on my application when I test it... Its works when my focus is not on application
[NSApp requestUserAttention:NSCriticalRequest];
Is any way to bounce the icon even focus on application...
Amit Battan
2010-01-08 12:20:15
I think you don't have to request user attention if your application is active as the user is, well, using your application.Maybe you should consider using the Growl framework to display visual notifications.
Laurent Etiemble
2010-01-08 12:25:08