Cocoa: fix const error

This commit is contained in:
rich2014 2023-11-21 19:21:21 +08:00
parent 1efcbc5377
commit b3928ed3df
2 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,7 @@ var
NSSTR_LINE_SEPARATOR: NSString;
NSSTR_PARAGRAPH_SEPARATOR: NSString;
NSSTR_KEY_ENTER: NSString;
NSSTR_KEY_ESC: NSString;
NSSTR_KEY_EQUALS: NSString;
NSSTR_KEY_PLUS: NSString;
@ -62,6 +63,7 @@ initialization
NSSTR_LINE_SEPARATOR:= NSString.alloc.initWithUTF8String(#$E2#$80#$A8);
NSSTR_PARAGRAPH_SEPARATOR:= NSString.alloc.initWithUTF8String(#$E2#$80#$A9);
NSSTR_KEY_ENTER:= NSSTR(#13);
NSSTR_KEY_ESC:= NSSTR(#27);
NSSTR_KEY_EQUALS:= NSSTR('=');
NSSTR_KEY_PLUS:= NSSTR('+');

View File

@ -290,7 +290,7 @@ begin
aButton.setKeyEquivalentModifierMask(0);
if I = DefaultIndex then
aButton.setKeyEquivalent(NSSTR_KEY_ESC)
aButton.setKeyEquivalent(NSSTR_KEY_ENTER)
else if I = 0 then
// By default, the first button is the default button. If in our
// case this should not be the case, remove the default status