The attached patch fixes the following issues with the NSAlert class.

1. The callback passed to NSAlert's
beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:
was invoked with a wrong argument. In particular, the first argument
passed to the modal delegate was the GSAlertPanel, but it should be
the NSAlert instance. This is solved by adding two new instance
attributes and the auxiliary method _alertDidEnd:returnCode:contextInfo:.

2. The method addButtonWithTitle adds escape and Command-D key
equivalents to the Cancel and Don't Save buttons as documented, but
unfortunately forgets to take localization into account.

3. The method _setupPanel flips the title and informative message
when invoking the panel's -setTitleBar:... method. In addition, the
patch also supplies a (localized) default title "Alert" for the
panel if none was provided by the user as specified by Apple's
NSAlert documentation.

4. Keyboard navigation in alert panels did not work because
_initWithoutGModel invokes setRefusesFirstResponder: YES for all
buttons in the alert panel. The patch removes those calls.

Wolfgang

Attachment: alert.patch
Description: Binary data

_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to