Event: ParseBarcodeIndex

If you use the OnEncode event handle to encode the barcode text in your own encoding scheme, the event occurs if there is any invalid character in the value of Barcode property or Barcode parameter:

Syntax:

type

{ Defined in the pfmxCore2D unit }

TParseBarcodeIndex = function (Sender: TObject; Barcode: string; EncodedData: TBytes; InvalidEncodedDataIndex: Integer): Integer of object;

property ParseBarcodeIndex: TParseBarcodeIndex;

Parameters:
Return:

The index position of first invalid character in the value of Barcode parameter above should be returned. Please calculate it according to the values of EncodedData and InvalidEncodedDataIndex parameters above, and the encoding algorithm in your OnEncode event handle.

If the invalid byte value is in the prefix codes (for example the BOM), please return the value Verify_InvalidIndex_BeforeBarcode (-3). If the invalid byte value is in the suffix codes, please return the value Verify_InvalidIndex_AfterBarcode (-4). These consts are defined in the pfmxCore2D unit.

Note:

The event handle is not required if the value of Index parameter is correct in the OnInvalidChar event handle.

Contents