Copyright © 1997 Dieter Nöth email : hdNoeth@augsburg.baynet.de version : 1.02 date : 19.07.1997 description: Implements Paradox-style Inputmasks based on sourcecode from Borland's BP70 VALIDATE.PAS Unit. I don't know, why they dropped it from VCL :-( Bugs fixed: 1.02 : in dnPxMask.pas: Borland's example input mask (from DBD) *[&[*?]*[{#, ,.,;,,;;,:,;[,;],(,),}]] (capitalized words) allowed only ONE word to be entered. Yes, I should have tried at least the example masks, but I did it once and then I found a bug in Borland's Iteration function causing infinite loops in iterations (without a number) containing groups.... I thought, I fixed it, but this fix caused this new problem... There still may be some combinations of groups and iterations that will cause an infinite loop. So, if your running your program from within Delphi and it hangs while typing in a TPxMaskEdit, set a breakpoint in function Iteration and stop your program. If this happens within the PxMask-property editor you'll have to kill Delphi ;-). Before You send me a email complaining about this, please try to follow all those recursive calls with debugger (and remember, that part of code wasn't written by Borland, not me), maybe YOU'll fix it. If You don't, I'll try my best. in dnDBPxm.pas: stupid bug: In D2 method LoadPxMasks didn't work, because I changed code a bit (working with D1 and testing with D1) defined STableName as array[0..SizeOf(TFileName) - 1] of Char. In D1 TFileName is defined as String[79], but in D2 it's just string (= AnsiString = pointer), so sizeOf(TFileName) returns 4 instead, causing every filename truncated to first 3 chars. sorry. Changes: 1.02 : in dnPxMask.pas: Testing an input mask in DBD32 I noticed, that there's a new special char: ---> ~ <--- lower case Char and, of course, I implemented it. If You don't want to use this new feature, you may comment out that part in function Scan Changed resource-file names and split dnPxReg into PxReg16/PxReg32, so it's easier to maintain 16/32 bit Delphi in one directory files : dnPxMask.pas component TPxMaskEdit dnDBPxM.pas data-aware component TDBPxEdit dnPxProp.pas property-editor for Paradox-masks PxReg16.pas Registers Component for 16 bit-Delphi PxReg16.dcr 16-bit dcr file PxReg32.pas Registers Component for 32 bit-Delphi PxReg32.dcr 32-bit dcr file dnPxCnst.pas Constants for resource-file \En\dnPxCnst.rc english rc-file \En\dnPxCnst.R16 16 bit english Res-file \En\dnPxCnst.R32 32 bit english Res-file \En\dnPxProp.dfm english dfm-file \De\dnPxCnst.rc german rc-file \De\dnPxCnst.R16 16 bit german Res-file \De\dnPxCnst.R32 32 bit german Res-file \De\dnPxProp.dfm german dfm-file usage: simply add PxReg16 (Delphi 1) or PxReg32 (Delphi 2) to your library, recompile it and you'll find TPxMaskEdit on Additional-tab, TDBPxEdit on DataControls and TPxTable on DataAccess there's no help file, have a look at the interface sections for new properties..... This source is Freeware: You're free to use this component in any software you write. If you use this unit, you're under no obligation to mention any copyrights for the use of the component or my name (although you're allowed to do so if you like). However, you are not allowed to: - include these components in a commercial library of Delphi components. - redistribute this source code as shareware under your name. You're free to modify this source code to suit your needs. If you find any bugs or make significant changes to this component, please email me: hdNoeth@augsburg.baynet.de Users of this source code must accept this DISCLAIMER OF WARRANTY: THIS SOURCE CODE IS SUPPLIED AS IS. THE AUTHOR DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED INCLUDING, WITHOUT LIMITATIONS THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE. THE AUTHOR ASSUMES NO LIABILITY FOR DAMAGED, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF THIS SOURCE CODE.