RE: Return values of NSAlert

2014-10-22 Thread Lee Ann Rucker
@lists.apple.com [cocoa-dev-bounces+lrucker=vmware@lists.apple.com] on behalf of Gerriet M. Denkmann [gerr...@mdenkmann.de] Sent: Tuesday, October 21, 2014 8:59 PM To: cocoa-dev@lists.apple.com Subject: Return values of NSAlert NSAlert has: - (void)beginSheetModalForWindow:(NSWindow *)sheetWindow

Return values of NSAlert

2014-10-21 Thread Gerriet M. Denkmann
NSAlert has: - (void)beginSheetModalForWindow:(NSWindow *)sheetWindow completionHandler:(void (^)(NSModalResponse returnCode))handler NSModalResponse has three values: Stop, Abort, Continue - none of which bear any resemblance with the buttons: Default, Alternate, Other in my

Re: Return values of NSAlert

2014-10-21 Thread Marco S Hyman
The suggested alternative is NSAlertFirstButtonReturn, etc., which have values, which very much unlike the actual returned values. Those values worked for me found by trial an error because the documentation and headers made no sense at all. I was working in swift and found this code to

Re: Return values of NSAlert

2014-10-21 Thread Ken Thomases
On Oct 21, 2014, at 10:59 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSAlert has: - (void)beginSheetModalForWindow:(NSWindow *)sheetWindow completionHandler:(void (^)(NSModalResponse returnCode))handler NSModalResponse has three values: Stop, Abort, Continue - none of