|Anonymous | Login | Signup for a new account||2018-12-11 22:47 CET|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0005178||[JEDI VCL] 00 JVCL Components||major||always||2010-02-24 08:34||2011-06-10 16:09|
|Summary||0005178: TJvCustomEditorBase.ClearSelection does not clear, just deselects|
|Description||Using a TJVHLEditor wired up with a TJvEditDelete action does not work when text is seleceted and 'Delete' is pressed.|
should be changed to:
|Tags||No tags attached.|
JvEditor.html [^] (12,403 bytes) 2010-02-24 13:06
JVEditorCommon.html [^] (21,319 bytes) 2010-02-24 13:06
JvStdEditActions.html [^] (12,241 bytes) 2010-02-24 13:07
|I'm sorry, but clearing the selection is just meant to unselect everything, not delete the selected text.|
I'm sorry too, but you are wrong. Look at the implementation of TCustomEdit or look at the docs:
Use ClearSelection to delete the selected text from the edit control. If no text is selected, ClearSelection does nothing. If all of the text is selected, ClearSelection clears all text, like the Clear method.
Note: Calling ClearSelection does the same thing as sending the edit control a WM_CLEAR message.
Otherwise, it wouldn't be the logic handler of the TJvEditDelete action, would it?
This is bad naming of procedures then
Yes, I see what you mean now, there is name confusion and TJvEditDelete.ExecuteTarget should be implemented as:
procedure TJvEditDelete.ExecuteTarget(Target: TObject);
if Supports(Target, IStandardEditActions, Intf) then
Intf.Delete // NOT ClearSelection
else if Target is TCustomEdit then
The right solution might be to rename
IStandardEditActions.ClearSelection to IStandardEditActions.Deselect
IStandardEditActions.Delete to IStandardEditActions.ClearSelection
but I can't overlook the consequences
I don't meen to spam you, but let me present, what I think is the "right" solution.
I have attached my Guiffy diff reports on the three affected files.
I'm well aware that writers of TJvCustomEditor descendants have to handle the renaming of ClearSelection to Deselect.
The change form Delete to ClearSelection is handled in the binding of the interface to the TJvCustomEditorBase class, so it should require no handling.
|This is now fixed. The IStandardEditActions.Delete method is gone (it was a relict from copying the IFixedPopupIntf interface) and the IStandardEditActions.ClearSelection method is redirected to TJvEditorCommon.DeleteSelected. The old TJvEditorCommon.ClearSelection is renamed to Deselect.|
|2010-02-24 08:34||TheRoadrunner||New Issue|
|2010-02-24 09:57||obones||Note Added: 0017208|
|2010-02-24 09:57||obones||Status||new => feedback|
|2010-02-24 10:02||TheRoadrunner||Note Added: 0017209|
|2010-02-24 10:20||obones||Note Added: 0017210|
|2010-02-24 10:20||obones||Status||feedback => confirmed|
|2010-02-24 10:38||TheRoadrunner||Note Added: 0017211|
|2010-02-24 10:43||TheRoadrunner||Note Added: 0017212|
|2010-02-24 13:06||TheRoadrunner||File Added: JvEditor.html|
|2010-02-24 13:06||TheRoadrunner||File Added: JVEditorCommon.html|
|2010-02-24 13:07||TheRoadrunner||File Added: JvStdEditActions.html|
|2010-02-24 13:11||TheRoadrunner||Note Added: 0017213|
|2010-02-24 18:34||AHUser||Note Added: 0017215|
|2010-02-24 18:34||AHUser||Status||confirmed => resolved|
|2010-02-24 18:34||AHUser||Fixed in Version||=> Daily / SVN|
|2010-02-24 18:34||AHUser||Resolution||open => fixed|
|2010-02-24 18:34||AHUser||Assigned To||=> AHUser|
|2011-06-10 16:09||obones||Fixed in Version||Daily / SVN => 3.40|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|