View Issue Details

IDProjectCategoryView StatusLast Update
0018419LazarusWidgetsetpublic2011-01-24 10:53
ReporterIngo Steiniger Assigned ToZeljan Rikalo  
Status closedResolutionfixed 
Product Version0.9.31 (SVN) 
Fixed in Version0.9.29 (SVN) 
Summary0018419: [QT] TMemo.OnChange isn't fired at TMemo.Append
DescriptionAdding Strings to a TMemo using Append, Lines.Add or Lines.Insert doesn't fire the OnChange event.

Additional InformationThis occurs with 0.9.31 trunk and 0.9.30 fixes branch.
To reproduce create a new project with 2 Memos, one button an this code.

procedure TForm1.Button2Click(Sender: TObject);
var i:Integer;
  for i:=1 to 10 do
// Memo1.Lines.Add('Test'+IntToStr(i));
// Memo1.Lines.Insert(0, 'Test'+IntToStr(i));

procedure TForm1.Memo1Change(Sender: TObject);
  Memo2.Append('got it');
TagsNo tags attached.
Fixed in Revision29062
Attached Files


Zeljan Rikalo

2011-01-07 21:00

developer   ~0044977

Are you sure that it should trigger in such cases ? Does win32 or gtk2 triggers then ? I'm not sure that you're correct.OnChange should trigger when user types,cuts,paste text, and I'm pretty sure that qt behaviour was similar to gtk's one month ago.

Zeljan Rikalo

2011-01-07 21:02

developer   ~0044978

Ingo Steiniger

2011-01-10 12:16

reporter   ~0045040

>>Does win32 or gtk2 triggers then ?
Yes they do. Also Carbon does. Tested with XP SP3, Ubuntu 10.10, MacOS 10.5

>>Are you sure that it should trigger in such cases ?
No, but it would be more logical to me if they would behave same.

Zeljan Rikalo

2011-01-10 12:30

developer   ~0045041

ok, it's not problem to pass such events, but I don't like such behaviour (even if Delphi is doing so) .... OnChange() should trigger when user does change ... not when changing something programatically IMO.
I'll try to commit such changes in next days since I'm pretty busy with my job atm.

Zeljan Rikalo

2011-01-17 08:44

developer   ~0045252

Please test and close if ok.

Ingo Steiniger

2011-01-20 14:10

reporter   ~0045333

It's working like expected. Thanks.

Issue History

Date Modified Username Field Change
2011-01-06 22:04 Ingo Steiniger New Issue
2011-01-06 22:04 Ingo Steiniger Widgetset => QT
2011-01-07 09:06 Vincent Snijders LazTarget => -
2011-01-07 09:06 Vincent Snijders Assigned To => Zeljan Rikalo
2011-01-07 09:06 Vincent Snijders Status new => assigned
2011-01-07 21:00 Zeljan Rikalo Note Added: 0044977
2011-01-07 21:00 Zeljan Rikalo Status assigned => feedback
2011-01-07 21:02 Zeljan Rikalo Note Added: 0044978
2011-01-10 12:16 Ingo Steiniger Note Added: 0045040
2011-01-10 12:30 Zeljan Rikalo Note Added: 0045041
2011-01-17 08:44 Zeljan Rikalo Fixed in Revision => 29062
2011-01-17 08:44 Zeljan Rikalo Status feedback => resolved
2011-01-17 08:44 Zeljan Rikalo Resolution open => fixed
2011-01-17 08:44 Zeljan Rikalo Note Added: 0045252
2011-01-20 14:10 Ingo Steiniger Status resolved => closed
2011-01-20 14:10 Ingo Steiniger Note Added: 0045333
2011-01-24 10:53 Vincent Snijders Fixed in Version => 0.9.29 (SVN)