Questions tagged [nsalert]
126 questions
0
votes
1 answer
NSAlert in XCode 7
I'm looking to update this code for 10.8 to 10.11. Here is original code.
NSAlert *alertSheet = [NSAlert alertWithMessageText:@"Message Text." defaultButton:@"OK" alternateButton:nil otherButton:nil…

FlameCoder
- 49
- 1
- 8
0
votes
1 answer
OS X NSAlert window won't close in xCode 8 in Objective-C
I used the method below in xCode 7 to show alerts/errors. I know alertWithMessageText is deprecated now. If I use this method in xCode 8 (though deprecated), the window doesn't close when the user presses the Ok button. I have looked at dozens of…

rick
- 51
- 6
0
votes
2 answers
Programmatically increase font size for NSAlert
I can't seem to increase the font size of my NSAlert - or even the size of the entire box.
else if array[arraycount].containsString("Error: error.") {
let myPopup: NSAlert = NSAlert()
myPopup.alertStyle = NSAlertStyle.WarningAlertStyle
…

cheesydoritosandkale
- 569
- 7
- 24
0
votes
1 answer
How to disable all drag-and-drop operations when NSAlert is shown as modal window
I have NSWindow with custom NSView. This custom NSView override performDragOperation method. Drag-and-drop operations works good. But when I create and show NSAlert as modal window I need block drag-and-drop, method, performDragOperation shouldn't…

Victor.V
- 177
- 1
- 9
0
votes
1 answer
NSAlert beginSheetModalForWindow Not Showing Alert
I have a settings view controller that is presented as a sheet. It has a button that saves the settings if they are valid. If the settings are valid the view controller is dismissed. If they are not valid the user gets an alert saying the settings…

user1822824
- 2,478
- 6
- 41
- 65
0
votes
1 answer
Call a sheet from within an alert causes weird window problems
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:
-…

nosedive25
- 2,477
- 5
- 30
- 45
0
votes
1 answer
Alert message not disappearing when the user click "ok" button
I am using alert sheet to show the alert message. I put the alert sheet inside the main thread and i use more alert sheet like this but while running the app alert message appears.
But sometimes when the user click ok button in the alert message.…

mvm
- 193
- 1
- 4
- 22
0
votes
0 answers
Adding loading gif to NSAlert
I am wanting to add a loading gif to my NSAlert I have tried this but it does not seem to be working:
NSProgressIndicator * gif;
gif.style = NSProgressIndicatorSpinningStyle;
[gif startAnimation:self];
NSAlert *alert = [[NSAlert alloc]…

maxisme
- 3,974
- 9
- 47
- 97
0
votes
1 answer
How to create alerts that look similar to OS X notifications?
From alerts, I'm assuming this picture represents is a panel, not a sheet (my understanding is that sheets are overlays over already open apps).
I'm looking to create a custom, or just built in 'clean' popup alert (notification). I can't seem to…

Jono
- 3,393
- 6
- 33
- 48
0
votes
2 answers
Add "informative text" to Alert if TextFields are empty
I am trying to code a NSAlert, that appears when when some NSTextFields are empty.
I have 3 NSTextFields and I would like to have a NSAlert that shows which TextField ist empty in a list. It´s possible for me to do it for one text field, but how can…

Robby
- 23
- 8
0
votes
1 answer
how to close NSAlert after some time if no button is clicked by user
I want to close a alert Window (NSAlert) after specific period of time if user does not click on any of the buttons. Is there a way to set up a NSTimer to close the Alert Panel after some time, say 30 sec.

MacDeveloper
- 1,334
- 3
- 16
- 49
0
votes
1 answer
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.

Matt S.
- 13,305
- 15
- 73
- 129
0
votes
1 answer
Is there a Xamarin.Mac non-modal NSAlert dialog?
In Xamarin.Mac, I can easily create an NSAlert, and call RunModal(). The problem is, this hogs the MainThread, and blocks other things from running. For example, if a thread from ThreadPool calls InvokeOnMainThread( delegate => {…

Edward Ned Harvey
- 6,525
- 5
- 36
- 45
0
votes
1 answer
NSAlert duplicates "help" menu
I have a very simple modal code in my project:
/*!
* @method popUpDialog:
* @abstract Triggers a pop-up window.
*/
- (void)popUpDialog:(NSString *)prompt {
NSAlert * alert = [[[NSAlert alloc] init] autorelease];
[alert…

Apollo
- 1,913
- 2
- 19
- 26
0
votes
1 answer
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…

mon4goos
- 1,569
- 13
- 24