int [] stringRef = new int [1]; stringRef [0] = stringToStringRef (roleToOs (event.detail)); if (stringRef [0] == 0) return code; int [] stringRef2 = new int [1]; stringRef2 [0] = OS.HICopyAccessibilityRoleDescription (stringRef [0], 0); OS.SetEventParameter (theEvent, OS.kEventParamAccessibleAttributeValue, OS.typeCFStringRef, 4, stringRef2); return OS.noErr;
if (event.detail != -1) { String appRole = roleToOs (event.detail); String appSubrole = null; int index = appRole.indexOf(':'); if (index != -1) { appSubrole = appRole.substring(index + 1); appRole = appRole.substring(0, index); } int stringRef1 = stringToStringRef (appRole); if (stringRef1 != 0) { int stringRef2 = 0; if (appSubrole != null) stringRef2 = stringToStringRef (appSubrole); int stringRef3 = OS.HICopyAccessibilityRoleDescription (stringRef1, stringRef2); OS.CFRelease(stringRef1); if (stringRef2 != 0) OS.CFRelease(stringRef2); if (stringRef3 != 0) { OS.SetEventParameter (theEvent, OS.kEventParamAccessibleAttributeValue, OS.typeCFStringRef, 4, new int [] {stringRef3}); OS.CFRelease(stringRef3); return OS.noErr; } } } return OS.CallNextEventHandler (nextHandler, theEvent);
	int getRoleDescriptionAttribute (int nextHandler, int theEvent, int userData) {		int code = OS.CallNextEventHandler (nextHandler, theEvent);		AccessibleControlEvent event = new AccessibleControlEvent(this);		event.childID = getChildIDFromEvent(theEvent);		event.detail = osToRole(osRoleAttribute);		for (int i = 0; i < accessibleControlListeners.size(); i++) {			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);			listener.getRole(event);		}		int [] stringRef = new int [1];		stringRef [0] = stringToStringRef (roleToOs (event.detail));		if (stringRef [0] == 0) return code;		int [] stringRef2 = new int [1];		stringRef2 [0] = OS.HICopyAccessibilityRoleDescription (stringRef [0], 0);		OS.SetEventParameter (theEvent, OS.kEventParamAccessibleAttributeValue, OS.typeCFStringRef, 4, stringRef2);		return OS.noErr;	}