public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
 * shoes/native/cocoa.m: the `confirm` dialog was always returning nil.  thanks 
 tamal!
why (author)
Fri Jul 11 10:19:36 -0700 2008
commit  2228b9fb19a21c643a2dc4f99ddcdd469e3f82fa
tree    d1f50e33434d242024d827bc48557c75909de7db
parent  c5d846c1b112b053179c16d77821d71054c8233b
...
1076
1077
1078
1079
 
1080
1081
 
1082
1083
1084
...
1076
1077
1078
 
1079
1080
 
1081
1082
1083
1084
0
@@ -1076,9 +1076,9 @@ shoes_dialog_confirm(VALUE self, VALUE quiz)
0
   NSAlert *alert = [NSAlert alertWithMessageText: @"Shoes asks:"
0
     defaultButton: @"OK" alternateButton: @"Cancel" otherButton:nil 
0
     informativeTextWithFormat: [NSString stringWithUTF8String: msg]];
0
-  answer = ([alert runModal] == NSAlertFirstButtonReturn ? Qtrue : Qfalse);
0
+  answer = ([alert runModal] == NSOKButton ? Qtrue : Qfalse);
0
   RELEASE;
0
-  return Qnil;
0
+  return answer;
0
 }
0
 
0
 VALUE

Comments

Bluebie Sat Jul 12 01:46:35 -0700 2008

Also ‘ask(“message”)’ returns nil on mac os x. Displays no window.