After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 95921 - shouldn't call AccessibleText_getText when SR_EVENT_TEXT_CHANGED_DELETED emited
shouldn't call AccessibleText_getText when SR_EVENT_TEXT_CHANGED_DELETED emited
Status: RESOLVED FIXED
Product: gnopernicus
Classification: Deprecated
Component: srcore
unspecified
Other Solaris
: Normal normal
: ---
Assigned To: remus draica
remus draica
Depends on:
Blocks:
 
 
Reported: 2002-10-16 09:59 UTC by Kyle Yuan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kyle Yuan 2002-10-16 09:59:38 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.
Comment 1 remus draica 2002-10-22 11:29:24 UTC
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?
Comment 2 Kyle Yuan 2002-10-24 01:02:25 UTC
remus, when the text-changed:insert will be emitted in gtk?
Comment 3 remus draica 2002-10-28 08:30:46 UTC
The text-changed:insert is emitted after text was inserted. 

Comment 4 bill.haneman 2003-01-24 12:58:44 UTC
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.
Comment 5 remus draica 2003-01-29 08:13:49 UTC
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.
Comment 6 bill.haneman 2003-01-29 14:47:50 UTC
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
Comment 7 remus draica 2003-02-05 11:42:51 UTC
Bug fixed on CVS.

Some issues related to this bug in bug number 105291.