Very Old Date problem
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 11 times
- Contact:
Re: Very Old Date problem
Mr Antonio
Try to block one or two characters with mouse and then type.
In case of character variable, the typed character replaces the blocked characters. In case of Date this gives unexpected results.
Try to block one or two characters with mouse and then type.
In case of character variable, the typed character replaces the blocked characters. In case of Date this gives unexpected results.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Very Old Date problem
Antonio
Adding Set( 29, .T. ) has no effect ... the trick to the error is to set your cursor directly over and hi-lite the last digit 6 of the year and type over it with a different number like 7 .. you will see how the date becomes invalid.
I have seen this where data entry people make a mistake in entering a date 04/27/2016 and meant to enter 2015 as the year .. they go back and ONLY hi-light the 6 ( not the entire date ) and change it to ( something else ) 5 .. and that is where the date resolves as invalid.
Thanks
Rick Lipkin
Adding Set( 29, .T. ) has no effect ... the trick to the error is to set your cursor directly over and hi-lite the last digit 6 of the year and type over it with a different number like 7 .. you will see how the date becomes invalid.
I have seen this where data entry people make a mistake in entering a date 04/27/2016 and meant to enter 2015 as the year .. they go back and ONLY hi-light the 6 ( not the entire date ) and change it to ( something else ) 5 .. and that is where the date resolves as invalid.
Thanks
Rick Lipkin
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Very Old Date problem
Rick,
OK, now I see the problem. Before I was assuming the cursor was in the overtype mode, and I also tried insert mode. I didn't think to try highlighting the last character. I would ever do it that way, but with many users, someone is going to do just about every possibility.
It does seem to be a bug. I'm guessing in xHarbour, since that is where the old Clipper GET code is.
James
OK, now I see the problem. Before I was assuming the cursor was in the overtype mode, and I also tried insert mode. I didn't think to try highlighting the last character. I would ever do it that way, but with many users, someone is going to do just about every possibility.
It does seem to be a bug. I'm guessing in xHarbour, since that is where the old Clipper GET code is.
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 11 times
- Contact:
Re: Very Old Date problem
I think the fix is required in fwh code only.
We are looking into it.
We are looking into it.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 11 times
- Contact:
Re: Very Old Date problem
Not yet solved.
But I too have it on top of my mind.
Most likely in fwh 16.05
But I too have it on top of my mind.
Most likely in fwh 16.05
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Very Old Date problem
To All
Wanted to once again put this back on the radar scope..
Thanks
Rick Lipkin
Wanted to once again put this back on the radar scope..
Thanks
Rick Lipkin
- Antonio Linares
- Site Admin
- Posts: 42662
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 69 times
- Been thanked: 96 times
- Contact:
Re: Very Old Date problem
It seems as the bug is related with method GetDelSel()
If I comment its call from here (class TGet)
then I can block the latest digit from the year and I can properly replace it
If I comment its call from here (class TGet)
Code: Select all | Expand
::GetSelPos( @nLo, @nHi )
// Delete selection
if nHi != nLo
// ::GetDelSel( nLo, nHi )
::EditUpdate()
endif
then I can block the latest digit from the year and I can properly replace it
- Antonio Linares
- Site Admin
- Posts: 42662
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 69 times
- Been thanked: 96 times
- Contact:
Re: Very Old Date problem
Please discard my previous message. It looks to me more as an ::oGet:Insert() and ::oGet:OverStrike() issue
going to do some more tests
going to do some more tests
- Antonio Linares
- Site Admin
- Posts: 42662
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 69 times
- Been thanked: 96 times
- Contact:
Re: Very Old Date problem
I think this is a very good solution 
Here it seems to work very well
We do appreciate your tests and feedback

Code: Select all | Expand
METHOD KeyChar( nKey, nFlags ) CLASS TGet
...
case nKey >= 32 .and. nKey < 256
...
::GetSelPos( @nLo, @nHi )
// Delete selection
if nHi != nLo
if ::oGet:Type != "D" // new
::GetDelSel( nLo, nHi )
::EditUpdate()
else
::SetPos( nLo + 1 ) // new
endif
endif
...
Here it seems to work very well

We do appreciate your tests and feedback
- Antonio Linares
- Site Admin
- Posts: 42662
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 69 times
- Been thanked: 96 times
- Contact:
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
- Massimo Linossi
- Posts: 509
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy