View Issue Details

IDProjectCategoryView StatusLast Update
0006042JEDI VCL00 JVCL Componentspublic2013-12-13 16:25
ReportergtaAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
Product Version3.39 
Target VersionFixed in Version 
Summary0006042: TJvDBLookupCombo searching with national characters UTF (with bugfix)
Descriptionin function TJvLookupControl.ProcessSearchKey and TJvDBLookupCombo.KeyPress searching is limited to
characters from range: 1..255:
For Delphi >= 2009 char type takes 2 bytes so it gets values greater than 255.



Here is a bug fix for TJvLookupControl.ProcessSearchKey:
 +++ OLD VERSION (CURRENT VERSION) +++
procedure TJvLookupControl.ProcessSearchKey(Key: Char);
var
  TickCount: Longint;
  S: string;
begin
  S := '';
  if (FDisplayField <> nil) {and (FDisplayField.DataType = ftString)} then
    case Key of
      Tab, Esc:
        FSearchText := '';
      Backspace, 0000032..0000255:
        if CanModify then
        begin
          if not FPopup then
     (...)
end;

 +++ NEW VERSION (WITHOUT BUG) +++
procedure TJvLookupControl.ProcessSearchKey(Key: Char);
var
  TickCount: Longint;
  S: string;
begin
  S := '';
  if (FDisplayField <> nil) {and (FDisplayField.DataType = ftString)} then
    case Key of
      Tab, Esc:
        FSearchText := '';
      // Backspace, 0000032..0000255:
      Backspace, 0000032..High(Char):
        if CanModify then
        begin
          if not FPopup then
     (...)
end;




Here is a bug fix for TJvDBLookupCombo.KeyPress
 +++ OLD VERSION (CURRENT VERSION) +++
procedure TJvDBLookupCombo.KeyPress(var Key: Char);
begin
  if FListVisible then
  begin
    if TabSelects and IsDropDown and (Key = Tab) then
      Key := Cr;

    if CharInSet(Key, [Cr, Esc]) then
    begin
      CloseUp(Key = Cr);
      Key := #0;
    end
    else
      FDataList.KeyPress(Key)
  end
  else
  begin
    if CharInSet(Key, [0000032..0000255]) then
    begin
      DropDown;
      if FListVisible then
        FDataList.KeyPress(Key);
    
     (...)
end;

 +++ NEW VERSION (WITHOUT BUG) +++
procedure TJvDBLookupCombo.KeyPress(var Key: Char);
begin
  if FListVisible then
  begin
    if TabSelects and IsDropDown and (Key = Tab) then
      Key := Cr;

    if CharInSet(Key, [Cr, Esc]) then
    begin
      CloseUp(Key = Cr);
      Key := #0;
    end
    else
      FDataList.KeyPress(Key)
  end
  else
  begin
    // if CharInSet(Key, [0000032..0000255]) then
    if (Key >= 0000032) AND (Key <= High(Char)) then
    begin
      DropDown;
      if FListVisible then
        FDataList.KeyPress(Key);
    
     (...)
end;
TagsNo tags attached.

Relationships

duplicate of 0006174 resolvedAHUser jvDBLookup and jvDBLookupTreeView don't search by Chars of codes greater than 255 (ex. Polish letters) 
has duplicate 0006043 resolvedobones TJvDBLookupTreeViewCombo searching with national characters UTF (with bugfix) 

Activities

obones

2013-01-15 16:03

administrator   ~0020377

Please provide the zipped sources of a sample application showing this.

obones

2013-12-13 16:25

administrator   ~0020836

Please see 0006174

Issue History

Date Modified Username Field Change
2012-12-03 14:08 gta New Issue
2013-01-15 16:03 obones Note Added: 0020377
2013-01-15 16:03 obones Status new => feedback
2013-01-15 16:03 obones Relationship added has duplicate 0006043
2013-12-13 11:36 obones Status feedback => acknowledged
2013-12-13 16:25 obones Note Added: 0020836
2013-12-13 16:25 obones Relationship added duplicate of 0006174
2013-12-13 16:25 obones Duplicate ID 0 => 6174
2013-12-13 16:25 obones Status acknowledged => resolved
2013-12-13 16:25 obones Resolution open => duplicate
2013-12-13 16:25 obones Assigned To => obones