Accessibility for NSTableView
Accessibility for NSTableView
- Subject: Accessibility for NSTableView
- From: Houdah - ML Pierre Bernard <email@hidden>
- Date: Fri, 23 Apr 2010 16:41:08 +0200
Hi!
I have a table view which lists files. I would like to make the represented objects available through Accessibility. I.e. I want to add NSAccessibilityURLAttribute and NSAccessibilityFilenameAttribute to the table rows.
So far, I have come up with this:
- (id)accessibilityHitTest:(NSPoint)point;
{
NSObject *row = [super accessibilityHitTest:point];
if (row != nil) {
@try {
NSNumber *rowNumber = [row valueForKey:@"row"];
NSObject *dataSource = [self dataSource];
ResultItem *resultItem = [dataSource tableView:self objectValueForTableColumn:nil row:[rowNumber intValue]];
[row accessibilitySetOverrideValue:[resultItem pathURL] forAttribute:NSAccessibilityURLAttribute];
[row accessibilitySetOverrideValue:[resultItem path] forAttribute:NSAccessibilityFilenameAttribute];
}
@catch (NSException *exception) {
NSLog(@"exception: %@", exception);
}
}
return row;
}
Sadly, this is not working. Neither attribute is visible in the Accessibility Inspector.
Best,
Pierre Bernard
Houdah Software s.à r.l.
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden