nsalert

Can NSAlert Be Used to Create a Floating Window?

I have a Cocoa application that displays an application-modal alert using the NSAlert class. I'd like the alert window to float above all other applications' windows. Can this be done with NSAlert, or do I need to implement my own window? I don't know if any of this matters, but the application is an agent application (LSUIElement is t...

NSAlert in Fullscreen

Hi Everyone: I am creating a fullscreen app and am wondering if there is some way to make NSAlert go above the CGDisplayCapture that I created. Right now, the NSAlert is displaying behind the display capture. My main window is displaying just fine (after adjusting it with setLevel:) but NSAlert doesn't seem to be working as well. I a...

Changing NSApplicationIcon across a running application?

I'd like to adjust the NSApplicationIcon image that gets shown automatically in all alerts to be something different than what is in the app bundle. I know that it's possible to set the dock icon with [NSApplication setApplicationIconImage:] -- but this only affects the dock, and nothing else. I'm able to work around this issue some of...

Calling an NSAlert from didEndSelector of another NSAlert

I need to bring up an NSAlert based on the response from another NSAlert. However, when I try to call it from the didEndSelector of the first one, all kinds of nasty things happen (like my document window disappearing and warnings about ordering problems printing to console). Any thoughts? ...

Can't get NSAlert to continually bounce dock icon

I seem to have the exact opposite problem than this question on stopping dock bounce. I can't get my app to continually bounce the dock icon! I too hate continually bouncing dock icons, but in this case if the user doesn't realise my app can't launch, they could potentially lose hours of time tracking data. Here's my code that I've p...

UIAlertView Pops Up Three Times per Call Instead of Just Once

I am getting odd behavior from an NSAlert in two different parts of my program. The behavior is: Alert appears and then spontaneously disappears. Alert reappears and then remains until dismissed by user i.e. normal behavior. Alert reappears again. This behavior only occurs the first time the method that displays the alert is called....

Usable mainmenu when sheet is shown

How does one react to menuitems that are clicked via mouse or invoked via keyboard, e.g: CMD+Q ? [NSApp beginSheet:my_sheet ...arguments... ]; /* The sheet is now shown and the mainmenu isn't usable. How does one make it usable? */ [NSApp endSheet:my_sheet returnCode:0]; ...

Bring NSRunAlertPanel Dialogue to Front in Background Process

If you call NSRunAlertPanel() from a background process in Cocoa, the dialogue does not come to the front and instead stays behind other windows. This post shows that you can bring the dialogue to the front if you convert the process to a foreground process. If you keep the process a background process, however, is there any way to ...

NSWindow display alert when attempt to close

How can I display an NSAlert when an NSWindow attempts to close. This will also have to be turned on and off. ...

Focus NSAlert accessory item

I have an NSAlert item that uses an NSTextField as an accessory item to provide an prompt-like dialog box. The only problem that I have is that when the alert is ran the text field is not focused. I tried looking for a way to change NSAlert's first responder but found nothing. Is there a way to easy focus an accessory item in NSAlert? ...

Call a sheet from within an alert causes weird window problems

Hello, I decided to use an alert sheet with 2 buttons. When the user clicks the continue button a sheet made from a window should come down. The sheet comes down and the parent window closes along with the other sheet. The code I'm using is: - (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(int *)contextI...