GNOME Bugzilla – Bug 95921
shouldn't call AccessibleText_getText when SR_EVENT_TEXT_CHANGED_DELETED emited
Last modified: 2004-12-22 21:47:04 UTC
in SRObject.c, sro_set_details() obj->text = AccessibleText_getText (text, detail1, detail1 + detail2); shouldn't do this for SR_EVENT_TEXT_CHANGED_DELETED event, because the text you was trying to get is already deleted.
In gtk text-changed:delete event is emmited before text is effectively deleted, and detail1 contains start position and detail2 the length of text which will be deleted. In this way the deleted text is available and can be reported to user. Is possible to have a similar behaviour in mozilla?
remus, when the text-changed:insert will be emitted in gtk?
The text-changed:insert is emitted after text was inserted.
remus: the gnopernicus code that uses the detail parameters to get the deleted text is still wrong and needs to be changed. Realize that due to asynchronous event processing, you cannot be guaranteed that the offsets are still valid. You should be using the new AT-SPI api for getting the string associated with a text-changed event, "AccessibleTextChangedEvent_getChangeString()". Kyle, in the mozilla case you need to make sure that the ATK event is emitted before the text is deleted, since the ATK event is synchronously delivered to the atk-bridge, which uses the offsets to fill out the text string delivered by the AT-SPI API above.
Thanks for your information. I am agree that details are not always correct in case the event is processed later. You talk some time before about a function to get modified text, but I never see it in at-spi documentation, so I doesn't noe till now about it. If in at-spi are more such functions, please tell me where I have to look to find them.
remus: the function I described is documented in the inline, but for some reason it doesn't seem to be getting included in the HTML output. I am investigating why it's missing, thanks for pointing out the problem. The function definition/declaration is in spi.h, and you can see the inline comments in at-spi/cspi/cspi_event.c
Bug fixed on CVS. Some issues related to this bug in bug number 105291.