diff options
| author | Chinh Nguyen <unknown> | 2017-02-25 09:13:40 +1100 | 
|---|---|---|
| committer | Chinh Nguyen <unknown> | 2017-02-25 09:13:40 +1100 | 
| commit | 50f3572d8f0e2a2df0a1dc3ab721ee4bdf89b4a9 (patch) | |
| tree | 9d299ea2f475d1098c99326ab865d2ff2485a302 /cocoa/ScintillaView.mm | |
| parent | 3cbf72fe0b13700358b71c17b32e35ba9f06c814 (diff) | |
| download | scintilla-mirror-50f3572d8f0e2a2df0a1dc3ab721ee4bdf89b4a9.tar.gz | |
Bug [#1915]. Fix crash on OS X 10.9 due to accessibility API not available.
Diffstat (limited to 'cocoa/ScintillaView.mm')
| -rw-r--r-- | cocoa/ScintillaView.mm | 18 | 
1 files changed, 11 insertions, 7 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index cdb71ae55..fb299d947 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -79,7 +79,8 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)        [currentCursors addObject: [reverseArrowCursor retain]];      }      [self setClientView:[aScrollView documentView]]; -    self.accessibilityLabel = @"Scintilla Margin"; +    if ([self respondsToSelector: @selector(setAccessibilityLabel:)]) +       self.accessibilityLabel = @"Scintilla Margin";    }    return self;  } @@ -225,12 +226,15 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)                                     NSStringPboardType, ScintillaRecPboardType, NSFilenamesPboardType, nil]];      // Set up accessibility in the text role -    self.accessibilityElement = TRUE; -    self.accessibilityEnabled = TRUE; -    self.accessibilityLabel = NSLocalizedString(@"Scintilla", nil);	// No real localization -    self.accessibilityRoleDescription = @"source code editor"; -    self.accessibilityRole = NSAccessibilityTextAreaRole; -    self.accessibilityIdentifier = @"Scintilla"; +    if ([self respondsToSelector: @selector(setAccessibilityElement:)]) +    { +       self.accessibilityElement = TRUE; +       self.accessibilityEnabled = TRUE; +       self.accessibilityLabel = NSLocalizedString(@"Scintilla", nil);	// No real localization +       self.accessibilityRoleDescription = @"source code editor"; +       self.accessibilityRole = NSAccessibilityTextAreaRole; +       self.accessibilityIdentifier = @"Scintilla"; +    }    }    return self;  | 
