NSCell vs NSActionCell
NSCell vs NSActionCell
- Subject: NSCell vs NSActionCell
- From: Ricky Sharp <email@hidden>
- Date: Wed, 19 Jul 2006 19:13:24 -0500
I'm seeing more and more differences now between cells derived from
NSCell vs. NSActionCell.
My custom static text objects (IIStaticText[Cell]) derive from
NSControl and NSCell. One of the attributes of the object is help
content.
The cell then implemented this:
- (id)accessibilityAttributeValue:(NSString*)anAttribute
{
id theValue = nil;
if ([anAttribute isEqualToString:NSAccessibilityRoleAttribute])
{
theValue = NSAccessibilityStaticTextRole;
}
else if ([anAttribute
isEqualToString:NSAccessibilityHelpAttribute])
{
theValue = [self helpTagContent_II];
}
else
{
theValue = [super accessibilityAttributeValue:anAttribute];
}
return theValue;
}
But Acc. Inspector would always show AXHelp: "(null") for all my
static text objects.
I placed a breakpoing on the [self helpTagContent_II] line and it was
never hit. I then changed my header so that IIStaticTextCell derived
from NSActionCell. Now, Acc. Inspector shows proper values for AXHelp.
In a previous e-mail, I pointed out other strange things when
subclassing NSCell vs. NSActionCell. It's strange that the framework
is not even calling my accessibilityAttributeValue code when it needs
to obtain the value for the help attribute (when using NSCell). Yet
the code is called a-ok when using NSActionCell.
Is the thought here that NSActionCell implies user-interaction and
thus certain attributes become relevant?
BTW, the reason I offer help content for my static text controls is
they are often used as problems next to some UI that displays info.
For example, I use static text controls as column headers for a
custom matrix that displays score information. The help content for
each column header provides details on what the column displays.
Should I file bugs on this? Or is this just how NSCell and
NSActionCell work in regards to accessibility?
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden