Questions tagged [nsalert]
126 questions
0
votes
1 answer
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…

neoneye
- 50,398
- 25
- 166
- 151
0
votes
1 answer
NSAlert for right to left languages (reversed layout)
I want to create localized NSAlert for right to left language like Arabic and Hebrew.
How can I reverse the layout so that Icon is on the right, TextField on the left, and also buttons start from the left side of the alert?
I can't seem to find the…

Nenad
- 335
- 1
- 7
0
votes
1 answer
What number to expect in the completion handler of NSAlert?
I am curious what constant is passed to completion handler in NSAlert method
- (void)beginSheetModalForWindow:(NSWindow *)sheetWindow completionHandler:(void (^)(NSModalResponse returnCode))handler
Is it a number like NSModalResponseStop=-1000 or…

wladik
- 41
- 4
0
votes
1 answer
NSAlert not working with NSTextField
I have an NSAlert with a NSView accessory view that contains two NSTextField's. I can put the cursor in the NSTextField's but I cannot type in them. Instead, it will type in the last line I was typing on in Xcode. I am using Xcode 6.
-…

jamespick
- 1,974
- 3
- 23
- 45
0
votes
1 answer
Behaviour of NSAlert with runModal
I am new to osx programming. I am using pyobjc to create the alerts. My understanding of Modal windows or dialogs is that modal windows require the user’s action before they can proceed. However, if I use runModal of NSAlert, I am still able to goto…

Pradeep Vairamani
- 4,004
- 3
- 36
- 59
0
votes
1 answer
How to assing a custom method inside a @selector XCode5
I have a NSAlert in XCode5
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"Notificación"];
[alert setInformativeText:mensaje];
[alert setAlertStyle:NSInformationalAlertStyle];
[alert beginSheetModalForWindow:window…

Jesus
- 8,456
- 4
- 28
- 40
0
votes
0 answers
Display Alert to specific user
I have a C or C++ executable which is running as root. From this executable I need to ask logged in user for some input. So I packaged this GUI code in a dynamic library, which can be linked with my C or C++ executable to get user input. But the…

user12345
- 425
- 1
- 3
- 14
0
votes
1 answer
NSAlert type not found
I am making an iOS application with opencv, so I am writing a lot of code in .mm files.
In .mm file of view controller, I am not able to write NSAlert *alert because it gives an error "NSAlert type not found". All other NSObjects are working fine…

Khawar Ali
- 3,462
- 4
- 27
- 55
0
votes
1 answer
Showing 2 sheets/panels - one-after-the-other
I'm trying to show 2 sheets (panels) one after the other. However, it looks like the first sheet doesn't have enough time to close before the second one shows up - so, it ends up in quite a mess.
Here's my code...
Macros
#define…

Dr.Kameleon
- 22,532
- 20
- 115
- 223
0
votes
2 answers
No ARC, the app didn't crash without releasing the object that created by hands
Currently I didn't use ARC in my app, and I tried to create a NSAlert object as a local variable, at the end of function, I didn't release it.
I expected that the app crash with that, the function code is here.
#define GLOBAL_VARIABLE 0
…

Itachi
- 5,777
- 2
- 37
- 69
0
votes
1 answer
NSRunAlertPanel caused performance issue on multithreading
Occasionally I have to do a popup alert window in my Cocoa code segments. Previously I used NSAlert directly then have runModal to go while I found that the NSRunAlertPanel is more easier to achieve my goal. So I decided to switch all my alert…

othercat
- 11
- 2
0
votes
1 answer
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…

John Gallagher
- 6,208
- 6
- 40
- 75
0
votes
1 answer
objective C background only applications NSAlert message on top of all other windows
I have a objective C background only application .At some point of stage i have to pop up an NSAlert message.The alert message is displaying properly but i have to minimize so many open windows(applications folder or any other folder window) and…

user12345
- 425
- 1
- 3
- 14
0
votes
1 answer
Accessory view in NSAlert doesn't render text with proper size
I'm trying to display an NSAlert with an accessory view so I can show a link in a block of text below the informative message. Here is my code.
#import "AppDelegate.h"
@implementation AppDelegate
-…

Romain Pouclet
- 864
- 2
- 8
- 17
0
votes
1 answer
Need to display a busy window on max with spinner
I'm a new Mac programmer writing my first mac app, actually porting an existing iOS app to MAC.
The app does a lot of remote communication, so when the user kicks off an operation, I want to display a busy window (or message box, or NSAlert maybe),…

N S
- 303
- 4
- 17