discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A few fixes for NSAlert, ...


From: Wolfgang Lux
Subject: A few fixes for NSAlert, ...
Date: Tue, 28 Oct 2008 23:57:29 +0100

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]