Bug 457964 - org.eclipse.swt.accessibility.Accessible.textSelectionChanged incorrectly sends COM.EVENT_OBJECT_VALUECHANGE message
Summary: org.eclipse.swt.accessibility.Accessible.textSelectionChanged incorrectly sen...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.5 M6   Edit
Assignee: Niraj Modi CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2015-01-20 11:54 EST by Maureen Kraft CLA
Modified: 2015-02-09 04:04 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maureen Kraft CLA 2015-01-20 11:54:53 EST
/**
	 * Sends a message to accessible clients that the text
	 * selection has changed within a custom control.
	 *
	 * @exception SWTException <ul>
	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
	 * </ul>
	 *
	 * @since 3.0
	 */
	public void textSelectionChanged () {
		checkWidget();
		if (!isATRunning ()) return;
		if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_VALUECHANGE hwnd=" + control.handle + " childID=" + eventChildID());
		COM.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID());
	}

Should return EVENT_OBJECT_TEXTSELECTIONCHANGED. 

Work around: Use sendEvent method. However, the StyledText widget calls 
	getAccessible().textSelectionChanged()and thus sends an EVENT_OBJECT_VALUECHANGE message instead of EVENT_OBJECT_TEXTSELECTIONCHANGED. 


See MSDN entry and IA2 Events page:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd318066%28v=vs.85%29.aspx
http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/_accessible_event_i_d_8idl.html#ae26846b6d521727ab696d20c3f43c0b5