Skip to main content



      Home
Home » Eclipse Projects » ACTF » Accessible name?
Accessible name? [message #468576] Wed, 03 September 2008 17:33 Go to next message
Eclipse UserFriend
I'm tinkering with the Java Validation Componentry. I've created a
simple subclass of Composite with a standard two-argument constructor.
I've added a Text to the composite.

The validator is complaining that I'm "Missing accessible name" on both
the Composite and the Text. It's not clear to me how I go about setting
the accessible name. Any pointers?

Wayne
Re: Accessible name? [message #468579 is a reply to message #468576] Tue, 30 September 2008 14:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi Wayne,

Sorry for this late reply. I had not noticed that my news reader doesn't
work well. I'll forward this to Mike Squillace who leads the validation
component.
Re: Accessible name? [message #468582 is a reply to message #468576] Fri, 03 October 2008 09:34 Go to previous message
Eclipse UserFriend
Wayne:
Sorry for this delayed response but have been traveling quite a bit and on
vacation this week.

The accessibleNmae on the Composite is missing bc Composite's simply do
not have an accessible name associated with them by default. This is a bug
in the validation document for SWT. You can, however, corect the error by
getting the accessible for the Composite and overwriting the getName
method:
public MyComposite (Composite parent, int style) {
super(parent, style);
getAccessible().addAccessibleListener(new AccessibleListener() {
public void getName (AccessibleEvent event) { event.result =
"composite name"; }
:
} });

For the text field, the validation is correct as the only way to get a
name for a text field is to asssociate itwith a label. Add a Label to the
composite prior to adding the Text object and this should repair that
error.
Re: Accessible name? [message #560492 is a reply to message #468576] Tue, 30 September 2008 14:44 Go to previous message
Eclipse UserFriend
Hi Wayne,

Sorry for this late reply. I had not noticed that my news reader doesn't
work well. I'll forward this to Mike Squillace who leads the validation
component.
Re: Accessible name? [message #560498 is a reply to message #468576] Fri, 03 October 2008 09:34 Go to previous message
Eclipse UserFriend
Wayne:
Sorry for this delayed response but have been traveling quite a bit and on
vacation this week.

The accessibleNmae on the Composite is missing bc Composite's simply do
not have an accessible name associated with them by default. This is a bug
in the validation document for SWT. You can, however, corect the error by
getting the accessible for the Composite and overwriting the getName
method:
public MyComposite (Composite parent, int style) {
super(parent, style);
getAccessible().addAccessibleListener(new AccessibleListener() {
public void getName (AccessibleEvent event) { event.result =
"composite name"; }
:
} });

For the text field, the validation is correct as the only way to get a
name for a text field is to asssociate itwith a label. Add a Label to the
composite prior to adding the Text object and this should repair that
error.
Previous Topic:Accessible name?
Next Topic:ACTF 0.5 Release Review
Goto Forum:
  


Current Time: Mon Jul 07 10:55:54 EDT 2025

Powered by FUDForum. Page generated in 0.04771 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top