From: <ah...@us...> - 2010-06-07 14:18:33
|
Revision: 12793 http://jvcl.svn.sourceforge.net/jvcl/?rev=12793&view=rev Author: ahuser Date: 2010-06-07 14:18:27 +0000 (Mon, 07 Jun 2010) Log Message: ----------- Mantis #5041: TJvDBFindEdit: FTimer triggers after ResetFilter Modified Paths: -------------- trunk/jvcl/run/JvDBFindEdit.pas Modified: trunk/jvcl/run/JvDBFindEdit.pas =================================================================== --- trunk/jvcl/run/JvDBFindEdit.pas 2010-06-07 09:14:20 UTC (rev 12792) +++ trunk/jvcl/run/JvDBFindEdit.pas 2010-06-07 14:18:27 UTC (rev 12793) @@ -196,11 +196,11 @@ function TJvDBFindEdit.IsNumeric(const S1: string): Boolean; var - ier: Integer; + Err: Integer; begin Result := True; - ToDoubleVal(S1, ier); - if ier > 0 then + ToDoubleVal(S1, Err); + if Err > 0 then Result := False; end; @@ -277,14 +277,14 @@ //begin // DateSeparator :='/'; // ShortDateFormat := 'mm/dd/yyyy'; - FSearchText := (DateToStr(StrToDate(FSearchText))); + FSearchText := DateToStr(StrToDate(FSearchText)); //end; end; procedure TJvDBFindEdit.ResetFilter; begin - Text := ''; - // FSearchText := ''; + Text := ''; // updates FSearchText + FTimerTimer(FTimer); // if the developer calls ResetFilter we have to do it now and not later (timer) FDataLink.DataSet.Filtered := False; end; @@ -317,7 +317,8 @@ else FDataLink.DataSet.Filtered := True; end; - FTimer.Interval := 100; + if FSearchText <> '' then // Do not change it if we just set it to 400 in Change() + FTimer.Interval := 100; end; procedure TJvDBFindEdit.Find(const AText: string); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |