• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Accessibility for NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: NSApplicationMain question
  • Next by Date: Re: setValue:forKey: and to-many relationships
  • Previous by thread: Any way to manually fix NSTextView's font rendering bug?
  • Next by thread: Reason for menuNeedsUpdate notification?
  • Index(es):
    • Date
    • Thread