Bug 39491 - GTK Text widget sends unexpected modifyText event when setText() is called
Summary: GTK Text widget sends unexpected modifyText event when setText() is called
Status: RESOLVED DUPLICATE of bug 38090
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux-GTK
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-30 22:05 EDT by Yoshio Horiuchi CLA
Modified: 2003-12-08 21:41 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshio Horiuchi CLA 2003-06-30 22:05:02 EDT
GTK Text widget sends unexpected modifyText event.

In the following test codes;
    Text text = new Text(parent, 0);
    text.addModifyListener(listener);
    text.setText("a");
    text.setText("b");

the listener catches 3 modify events, as follows;
    1, modifyText "a"
    2, modifyText ""  <<< unexpected!!!
    3, modifyText "b"

Thus, when setting a text, the Text widget removes contents first, then set new 
text.

This is unacceptable behavior.  
Many UIs use the modifyText event as a trigger of actions/commands.
It causes wrong UI behavior, and is significant problem.

Win2K Text widget works just fine.
Comment 1 Yoshio Horiuchi CLA 2003-06-30 22:09:13 EDT
Environment : Red Hat 8.0 + GTK 2.2
Comment 2 Felipe Heidrich CLA 2003-07-04 11:40:39 EDT
This a bug in GTK, I will talk to SN if SWT should try to work around this or 
not.

*** This bug has been marked as a duplicate of 38090 ***
Comment 3 Yoshio Horiuchi CLA 2003-12-08 21:41:35 EST
According to the 38090 remark, only Text widget would be fixed, but please
consider to fix Combo widget also.