View Issue Details

IDProjectCategoryView StatusLast Update
0006043JEDI VCL00 JVCL Componentspublic2013-01-15 16:03
ReportergtaAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
Product Version3.39 
Target VersionFixed in Version 
Summary0006043: TJvDBLookupTreeViewCombo searching with national characters UTF (with bugfix)
Description
in function TJvDBLookupControl.ProcessSearchKey searching is limited to
characters from range: VK_SPACE..255:
For Delphi >= 2009 char type takes 2 bytes so it gets values greater than 255.



Here is a bug fix:

 +++ OLD VERSION (CURRENT VERSION) +++
procedure TJvDBLookupControl.ProcessSearchKey(Key: Char);
var
  TickCount: Integer;
  S: string;
begin
  if (FListField <> nil) and (FListField.FieldKind = fkData) and
    ((FListField.DataType = ftString) or (FListField.DataType = ftWideString)) then
    case Word(Key) of
      VK_BACK, VK_ESCAPE:
        FSearchText := '';
      VK_SPACE..255:
        if CanModify then
        begin
          TickCount := GetTickCount;
          if TickCount - FSearchTickCount > 2000 then
     (...)
end;




 +++ NEW VERSION (WITHOUT BUG) +++
procedure TJvDBLookupControl.ProcessSearchKey(Key: Char);
var
  TickCount: Integer;
  S: string;
begin
  if (FListField <> nil) and (FListField.FieldKind = fkData) and
    ((FListField.DataType = ftString) or (FListField.DataType = ftWideString)) then
    case Word(Key) of
      VK_BACK, VK_ESCAPE:
        FSearchText := '';
      // VK_SPACE..255:
      VK_SPACE..Word(High(Char)):
        if CanModify then
        begin
          TickCount := GetTickCount;
          if TickCount - FSearchTickCount > 2000 then
     (...)
end;
TagsNo tags attached.

Relationships

duplicate of 0006042 resolvedobones TJvDBLookupCombo searching with national characters UTF (with bugfix) 

Activities

obones

2013-01-15 16:03

administrator   ~0020378

Duplicate

Issue History

Date Modified Username Field Change
2012-12-03 14:09 gta New Issue
2013-01-15 16:03 obones Note Added: 0020378
2013-01-15 16:03 obones Relationship added duplicate of 0006042
2013-01-15 16:03 obones Duplicate ID 0 => 6042
2013-01-15 16:03 obones Status new => resolved
2013-01-15 16:03 obones Resolution open => duplicate
2013-01-15 16:03 obones Assigned To => obones