changeset 1896:8637a32d33d9

Logic error caused the alert style to get set after the alert was shown.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 25 Oct 2013 16:56:08 +0000
parents fafe1a68f0fd
children 951356ced7d5
files mac/dw.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Fri Oct 25 09:38:21 2013 +0000
+++ b/mac/dw.m	Fri Oct 25 16:56:08 2013 +0000
@@ -3390,8 +3390,6 @@
     alert = [NSAlert alertWithMessageText:[ NSString stringWithUTF8String:title ] defaultButton:button1 alternateButton:button2 otherButton:button3 informativeTextWithFormat:@"%@", [[[NSString alloc] initWithFormat:[NSString stringWithUTF8String:format] arguments:args] autorelease]];
     va_end(args);
     
-    iResponse = [alert runModal];
-    
     if(flags & DW_MB_ERROR)
         [alert setAlertStyle:NSCriticalAlertStyle];
     else if(flags & DW_MB_INFORMATION)
@@ -3399,6 +3397,8 @@
     else
         [alert setAlertStyle:NSWarningAlertStyle];
 
+    iResponse = [alert runModal];
+    
     switch(iResponse)
     {
         case NSAlertDefaultReturn:    /* user pressed OK */