From ac709c97bf0a00dcd1153284ab52a8ab3c83166b Mon Sep 17 00:00:00 2001 From: David Richardson Date: Thu, 22 Oct 2026 12:37:02 -0600 Subject: [PATCH] AppKit: Document CPAlert's return code as the clicked button's tag CPAlert's documentation described the return code as the button index, which is only its default tag. * CPAlert: Document the alert return code as the clicked button's tag, which is its index unless changed. --- AppKit/CPAlert.j | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 08c4fa030..1f6fe0c8b 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -137,7 +137,8 @@ var bottomHeight = 71; @delegate -(void)alertDidEnd:(CPAlert)theAlert returnCode:(int)returnCode; Called when the user dismisses the alert by clicking one of the buttons. @param theAlert the alert panel that the user dismissed - @param returnCode the index of the button that the user clicked (starting from 0, + @param returnCode the tag of the button that the user clicked. Unless a button's + tag has been changed, it is the button's index (starting from 0, representing the first button added to the alert which appears on the right, 1 representing the next button to the left and so on) */