View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0008491||Lazarus||LCL||public||2007-03-09 19:58||2011-11-21 17:47|
|Reporter||Bart Broersma||Assigned To||Zeljan Rikalo|
|Platform||i386||OS||Suse Linux||OS Version||10.0|
|Product Version||0.9.20||Product Build|
|Target Version||1.0.0||Fixed in Version|
|Summary||0008491: TEdit.OnChange is fired if text is not changed (after pressing delete or backspace) in Linux|
|Description||If you press Delete or Backspace in a TEdit control then the OnChange event is fired wether or not the text is actually changed.|
This happens in Linux, not in Win32.
|Steps To Reproduce||Place a TEdit control on a form|
Let it's OnChange event do something trivial
Build and run
In the empty TEdit press BackSpace or Delete
- nothing happens
- The OnChange event is fired
procedure TControl.RealSetText(const Value: TCaption);
if FCaption = Value then Exit;
//the above line should prevent this from happening as far as I can see
//but if it should, it clearly does not
FCaption := Value;
//TextChanged sets Modified to true and then calls Change,
//which then fires OnChange if it is assigned
As far as I can see non of the GetText / SetText methods for TEdit are overridden, so TEdit.SetText should call TControl.RealSetText.
There may well be a relation with bug 0007243.
|Tags||No tags attached.|
|Fixed in Revision|
||RealSetText is called when the programmer changes the text, not when the widgetset changes the text because of user interaction.|
Well, I hav no clue then as to how this works.
But can it be fixed (I mean is it even possible then?). Is it in "our" (Laz/fpc) code, or does the OS do this to us?
If it cannot be fixed, then having a reliable "The contents have changed, do you want to save?" warning in any text editor is not gonna be possible if it relies on the Modified property.
(Well, one can always try to work around it of course)
||Works ok with gtk2. Suspended since it's gtk only.|
|2007-03-09 19:58||Bart Broersma||New Issue|
|2007-03-09 19:58||Bart Broersma||Widgetset||=> GTK|
|2007-03-09 20:43||Vincent Snijders||Relationship added||related to 0007243|
|2007-03-09 20:45||Vincent Snijders||LazTarget||=> 1.0|
|2007-03-09 20:45||Vincent Snijders||Note Added: 0011785|
|2007-03-09 20:45||Vincent Snijders||Status||new => acknowledged|
|2007-03-15 18:30||Bart Broersma||Note Added: 0011870|
|2008-04-24 09:57||Vincent Snijders||Target Version||=> 1.0.0|
|2010-03-10 11:25||Zeljan Rikalo||Status||acknowledged => resolved|
|2010-03-10 11:25||Zeljan Rikalo||Resolution||open => suspended|
|2010-03-10 11:25||Zeljan Rikalo||Assigned To||=> Zeljan Rikalo|
|2010-03-10 11:25||Zeljan Rikalo||Note Added: 0035151|
|2011-11-21 17:47||Zeljan Rikalo||Status||resolved => closed|