While I'm at it, here is another patch. It prevents NSAlert's
_setupPanel method from
raising an exception if there are less than three buttons on the panel.
--- Source/NSAlert.m (Revision 25440)
+++ Source/NSAlert.m (Arbeitskopie)
@@ -1582,6 +1582,7 @@
{
GSAlertPanel *panel;
NSString *title;
+ unsigned nbut;
panel = [[GSAlertPanel alloc] init];
_window = panel;
@@ -1599,13 +1600,14 @@
title = @"Alert";
break;
}
+ nbut = [_buttons count];
[panel setTitleBar: title
icon: _icon
title: _informative_text
message: _message_text
- def: [[_buttons objectAtIndex: 0] title]
- alt: [[_buttons objectAtIndex: 1] title]
- other: [[_buttons objectAtIndex: 2] title]];
+ def: (nbut > 0) ? [[_buttons objectAtIndex: 0] title] : nil
+ alt: (nbut > 1) ? [[_buttons objectAtIndex: 1] title] : nil
+ other: (nbut > 2) ? [[_buttons objectAtIndex: 2] title] :
nil];
}
}
Regards
Wolfgang
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep