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
0005909 [JEDI VCL] 00 JVCL Components minor always 2012-06-14 14:00 2016-04-01 19:19
Reporter Arioch View Status public  
Assigned To
Priority normal Resolution open  
Status acknowledged   Product Version Daily / GIT
Summary 0005909: RegExpr-validator is broken
Description D:\DelphiProjects\Libs\JediVCL\jvcl\run\JvValidators.pas

However introduced/copied/commited the change quoted below replaced RegExpr search with DOS file mask search.

JvValidators demo is broken, but of course, who runs demo and who would use RegExpr anyway :-)

The change below should be undone. It gets a bit beyond mere simplification
Additional Information  589 7454 15.06.2004 9:39:36 marquardt //=== { TJvRegularExpressionValidator } ======================================
   590 2083 22.06.2003 14:09:41 peter3
   591 11893 10.09.2008 0:45:14 obones function MatchesMask(const Filename, Mask: string{;
   592 11893 10.09.2008 0:45:14 obones const SearchFlags: TSearchFlags = [sfCaseSensitive]}): Boolean;
   593 6489 19.04.2004 3:55:47 ahuser {var
   594 2083 22.06.2003 14:09:41 peter3 URE: TURESearch;
   595 6489 19.04.2004 3:55:47 ahuser SL: TWideStringList;}
   596 2083 22.06.2003 14:09:41 peter3 begin
   597 6448 16.04.2004 21:28:30 peter3 Result := Masks.MatchesMask(Filename, Mask);
   598 6448 16.04.2004 21:28:30 peter3 (*
   599 2083 22.06.2003 14:09:41 peter3 // use the regexp engine in JclUnicode
   600 2083 22.06.2003 14:09:41 peter3 SL := TWideStringList.Create;
   601 2083 22.06.2003 14:09:41 peter3 try
   602 2083 22.06.2003 14:09:41 peter3 URE := TURESearch.Create(SL);
   603 2083 22.06.2003 14:09:41 peter3 try
   604 2083 22.06.2003 14:09:41 peter3 URE.FindPrepare(Mask, SearchFlags);
   605 2083 22.06.2003 14:09:41 peter3 // this could be overkill for long strings and many matches,
   606 2083 22.06.2003 14:09:41 peter3 // but it's a lot simpler than calling FindFirst...
   607 2083 22.06.2003 14:09:41 peter3 Result := URE.FindAll(Filename);
   608 2083 22.06.2003 14:09:41 peter3 finally
   609 2083 22.06.2003 14:09:41 peter3 URE.Free;
   610 2083 22.06.2003 14:09:41 peter3 end;
   611 2083 22.06.2003 14:09:41 peter3 finally
   612 2083 22.06.2003 14:09:41 peter3 SL.Free;
   613 2083 22.06.2003 14:09:41 peter3 end;
   614 6448 16.04.2004 21:28:30 peter3 *)
   615 2083 22.06.2003 14:09:41 peter3 end;
Tags No tags attached.
Attached Files ? file icon JvValidators.pas.patch [^] (1,030 bytes) 2016-04-01 19:17

- Relationships
related to 0005908acknowledged JEDI VCL little fix for Validators example 
parent of 0005912new JEDI Code Library TURESearch to be dumped or turned into wrapper around PCRE ? 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0021279)
wprins (reporter)
2016-04-01 18:12

Still present as of this writing 2016-04-01. (Wasted time today trying to use a regular expression validator for the first time. Why is this component not disabled until it's fixed?)
(0021280)
wprins (reporter)
2016-04-01 19:19

Uploaded simple fix with JclPCRE.TJclAnsiRegEx, which fixes the component for my use case. Probably needs more testing/review.

- Issue History
Date Modified Username Field Change
2012-06-14 14:00 Arioch New Issue
2012-06-14 14:00 Arioch Relationship added related to 0005908
2012-06-14 16:21 Arioch Relationship added parent of 0005912
2012-06-18 11:24 obones Status new => acknowledged
2016-04-01 18:12 wprins Note Added: 0021279
2016-04-01 19:17 wprins File Added: JvValidators.pas.patch
2016-04-01 19:19 wprins Note Added: 0021280


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