Subject Re: IB_EditEnh. Own error handling, how ?
Author Sándor Nagy

I'm a bit surprised, because I thought IBO is Jason's one person
project. :-)

> This error is not coming from EditEnh
The error is coming from the sysconsts.dcu runtime library. I've
changed the string to hungarian, but I don't like this solution.

>(you are not using the DateTime
> editor from the EnhComponents pack?)
I don't use TIB_DateTimePicker, because these date fields are part
of a datacapture screen with many other fields, and the customers
don't like to fill fields with comboboxes. (the problem with this
combo, if you fill the year part of the date, the cursor jumps back
to the check box at the beginning of the combobox, after it you have
to click on the month part to change the month ..., maybe I can
change this behaviour but the help is pretty pour for this component )

> I do have an update that I have not distributed yet which adds the
> following event handler...
> property OnValidateEdit: TEditEnhValidateEditEvent;
> {: Event occurs just prior to the default validation
> processing (on exit of control, or press of return key).
> Either process the contents of the control to make it valid,
> ready for default validation, or set the IsValid parameter
> to false to indicate that the value is not valid (skipping
> the default validation and raising the ValidateError event).}
> This would allow you to attach extended validation processing that
> could check the datetime conversion before it gets to the column
> assignment. Note that the new version of CustomEditEnh also makes
> so that Validate is called whether a mask is defined or not,
> you to attach code to this event for special processing even if no
> mask is defined.

This exactly is what I need, and what I was looking for.
I have to do my own validations before every others, beacuse the
capturing has been supported by an OCR(ICR), every field can contain
some illegal characters (rejects, where we couldn't recognize the
character from the image). Without this new feature I can't use
EditEnh, and it's very comfortable possibilities.

> This change is part of a widespread set of changes that I was
> preparing to accompany IBOv4. If your need is urgent I can see
> making this event available earlier

I like EditEnh, and I would like to use it, but If you have no
time to make this changes I can't use it, I have a deadline on the
beginning of january.

Just another question:
How can I get the string from the EditEnh (during the edit) ?
I tried with Text and DisplayText but I always get back the actual
datafields containment not the text what I can see in the editbox.

Thank you for your answer.
Good work.