Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006361 [JEDI VCL] 00 JVCL Components minor always 2014-11-22 00:40 2019-05-29 10:10
Reporter ricolebo View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.47
Summary 0006361: JvDBCombobox : Bug because search key is case insensitive
Description When the keyList are like this : kkk;KKK,KkK ... the comboBox can't work because the indeOf to find the key is case insensitive and so the seach found always the first value of the list.

This bug can be simply fixed, just set the TSTringList.caseSensitive to true

I attach a demo to show you the bug and how to fix it.
Additional Information The Fix : unit JvDBCombobox.pas

//=== { TJvCustomDBComboBox } ================================================

constructor TJvCustomDBComboBox.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  ControlStyle := ControlStyle + [csReplicatable];
  FDataLink := TFieldDataLink.Create;
  FDataLink.Control := Self;
  FDataLink.OnDataChange := DataChange;
  FDataLink.OnUpdateData := UpdateData;
  FDataLink.OnEditingChange := EditingChange;
  FPaintControl := TPaintControl.Create(Self, 'COMBOBOX');
  FBeepOnError := False;

  FListSettings := TJvDBComboBoxListSettings.Create(Self);
  FValues := TStringList.Create;
  FValues.CaseSensitive := True; // Fix
  FValues.OnChange := ValuesChanged;
  FEnableValues := True;
  Style := csDropDownList;
end;

Tags No tags attached.
Attached Files zip file icon TJvDBComboBox.zip [^] (19,369 bytes) 2014-11-22 00:40

- Relationships

-  Notes
(0021847)
mh (reporter)
2019-05-20 21:40

Pull request created and a property for controlling the search behavior added:
https://github.com/project-jedi/jvcl/pull/128 [^]
(0021851)
mh (reporter)
2019-05-28 22:42

Can be closed now as the fix for this has been merged in!

- Issue History
Date Modified Username Field Change
2014-11-22 00:40 ricolebo New Issue
2014-11-22 00:40 ricolebo File Added: TJvDBComboBox.zip
2014-12-04 15:53 obones Status new => acknowledged
2019-05-20 21:40 mh Note Added: 0021847
2019-05-28 22:42 mh Note Added: 0021851
2019-05-29 10:10 obones Status acknowledged => resolved
2019-05-29 10:10 obones Fixed in Version => Daily / GIT
2019-05-29 10:10 obones Resolution open => fixed
2019-05-29 10:10 obones Assigned To => obones


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker