At 05:28 2019-01-08, Frank Cazabon frank.cazabon@gmail.com wrote:
Gene, back in April last year you were asking if anyone could write code to your specification regarding the grid problems you were having. I don't recall ever seeing your specification, maybe if you posted it someone might be able to do the code for you.
At that time, I was also having difficulties posting to the list. I thought I had come up with something, but maybe, it did not make it and I mistakenly deleted it. Let me specify something simple:
Consider a cursor or table of: thetext c(20) evennr n(3) weirdnr n(3)
The validations are: thetext>"" evennr%2=0 weirdnr%3=0 and the row-level validation is: asc(thetext)%2=weirdnr%2
When a control-level validation error occurs, throw an appropriate message box and then set focus to the control with the erroneous value.
For a row-level validation:
1) All control-level validations should be done first. Start with the current control, then do all the others from left to right. The first that fails gets the message box, and checking stops.
Then, do the row-level validation. If it fails, throw an aoppropriate message box and then set focus to the control in the first column from the left of the values that are checked. (In the example above, thetext is left of weirdnr, so set focus to thetext.)
Part 2:
The columns can now be rearranged in any order. Despite this:
The coontrol-level validations should still set focus to the correct control.
The column-level validations done at the start of the row-level validation should be done in the order current then left-to-right. NOTE THAT THIS COULD NOW BE A DIFFERENT ORDER.
The row-level validation should still set focus to the leftmost involved control. NOTE THAT THIS MIGHT BE A DIFFERENT CONTROL. (Example: If weirdnr gets moved to the left of thetext, row-level validation failing should set focus to weirdnr.)
This is basic functionality that I want/need. I have been unable to get this to work with VFP's Grid despite my efforts.
[snip]
Sincerely,
Gene Wirchenko
Gene,
So the issue is not the grid or validations firing, but that, when a validation fails, the appropriate row and column need to be given focus. And that the validation needs a way to trigger a messagebox. And since the columns might be re-arranged, some logic is required to know which column to set focus. And that the validations need to fire in the column order. Is this correct?
I vaguely remember having some issues with setting focus to row/columns in the grid. I think I ended up trying to set focus and then having to keyboard (or similar) some navigations so that the grid would actually show the item as desired. But it's been a while since I played with it.....
I often did not use the field level validations since often, other fields needed to be evaluated as well. So other than simple limit validations (age can't be negative, etc.) most of the validations were done in the row validation. That code could be written to test by column order, but better would be to test all values and then return a list of errors and let the grid code arrange the errors by the appropriate order before setting focus.
But I do remember having my share of frustrations with the grid, so take this all with a grain of salt....
Fletcher
Fletcher Johnson FletcherSJohnson@Yahoo.com LinkedIn.com/in/FletcherJohnson twitter.com/fletcherJ strava.com/athletes/fletcherjohnson 408-946-0960 - work 408-781-2345 - cell
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Gene Wirchenko Sent: Wednesday, January 9, 2019 10:52 AM To: ProFox Email List Subject: Re: AW: Custom Scrollbar
At 05:28 2019-01-08, Frank Cazabon frank.cazabon@gmail.com wrote:
Gene, back in April last year you were asking if anyone could write code to your specification regarding the grid problems you were having. I don't recall ever seeing your specification, maybe if you posted it someone might be able to do the code for you.
At that time, I was also having difficulties posting to the list. I thought I had come up with something, but maybe, it did not make it and I mistakenly deleted it. Let me specify something simple:
Consider a cursor or table of: thetext c(20) evennr n(3) weirdnr n(3)
The validations are: thetext>"" evennr%2=0 weirdnr%3=0 and the row-level validation is: asc(thetext)%2=weirdnr%2
When a control-level validation error occurs, throw an appropriate message box and then set focus to the control with the erroneous value.
For a row-level validation:
1) All control-level validations should be done first. Start with the current control, then do all the others from left to right. The first that fails gets the message box, and checking stops.
Then, do the row-level validation. If it fails, throw an aoppropriate message box and then set focus to the control in the first column from the left of the values that are checked. (In the example above, thetext is left of weirdnr, so set focus to thetext.)
Part 2:
The columns can now be rearranged in any order. Despite this:
The coontrol-level validations should still set focus to the correct control.
The column-level validations done at the start of the row-level validation should be done in the order current then left-to-right. NOTE THAT THIS COULD NOW BE A DIFFERENT ORDER.
The row-level validation should still set focus to the leftmost involved control. NOTE THAT THIS MIGHT BE A DIFFERENT CONTROL. (Example: If weirdnr gets moved to the left of thetext, row-level validation failing should set focus to weirdnr.)
This is basic functionality that I want/need. I have been unable to get this to work with VFP's Grid despite my efforts.
[snip]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
Gene,
I've knocked up a quick demo which I hope meets your requirements and emailed you the link to the download on google drive.
Frank.
Frank Cazabon
On 09/01/2019 02:52 PM, Gene Wirchenko wrote:
At 05:28 2019-01-08, Frank Cazabon frank.cazabon@gmail.com wrote:
Gene, back in April last year you were asking if anyone could write code to your specification regarding the grid problems you were having. I don't recall ever seeing your specification, maybe if you posted it someone might be able to do the code for you.
At that time, I was also having difficulties posting to the list. I thought I had come up with something, but maybe, it did not make it and I mistakenly deleted it. Let me specify something simple:
Consider a cursor or table of: thetext c(20) evennr n(3) weirdnr n(3)
The validations are: thetext>"" evennr%2=0 weirdnr%3=0 and the row-level validation is: asc(thetext)%2=weirdnr%2
When a control-level validation error occurs, throw an appropriate message box and then set focus to the control with the erroneous value.
For a row-level validation:
1) All control-level validations should be done first. Start with the current control, then do all the others from left to right. The first that fails gets the message box, and checking stops.
Then, do the row-level validation. If it fails, throw an aoppropriate message box and then set focus to the control in the first column from the left of the values that are checked. (In the example above, thetext is left of weirdnr, so set focus to thetext.)
Part 2:
The columns can now be rearranged in any order. Despite this:
The coontrol-level validations should still set focus to the correct control.
The column-level validations done at the start of the row-level validation should be done in the order current then left-to-right. NOTE THAT THIS COULD NOW BE A DIFFERENT ORDER.
The row-level validation should still set focus to the leftmost involved control. NOTE THAT THIS MIGHT BE A DIFFERENT CONTROL. (Example: If weirdnr gets moved to the left of thetext, row-level validation failing should set focus to weirdnr.)
This is basic functionality that I want/need. I have been unable to get this to work with VFP's Grid despite my efforts.
[snip]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
Frank Would you mind to e-mail me the link also? Regards Koen
Op do 10 jan. 2019 om 15:06 schreef Frank Cazabon frank.cazabon@gmail.com
Gene,
I've knocked up a quick demo which I hope meets your requirements and emailed you the link to the download on google drive.
Frank.
Frank Cazabon
On 09/01/2019 02:52 PM, Gene Wirchenko wrote:
At 05:28 2019-01-08, Frank Cazabon frank.cazabon@gmail.com wrote:
Gene, back in April last year you were asking if anyone could write code to your specification regarding the grid problems you were having. I don't recall ever seeing your specification, maybe if you posted it someone might be able to do the code for you.
At that time, I was also having difficulties posting to thelist. I thought I had come up with something, but maybe, it did not make it and I mistakenly deleted it. Let me specify something simple:
Consider a cursor or table of: thetext c(20) evennr n(3) weirdnr n(3)The validations are: thetext>"" evennr%2=0 weirdnr%3=0 and the row-level validation is: asc(thetext)%2=weirdnr%2
When a control-level validation error occurs, throw anappropriate message box and then set focus to the control with the erroneous value.
For a row-level validation:
- All control-level validations should be done first. Start with
the current control, then do all the others from left to right. The first that fails gets the message box, and checking stops.
Then, do the row-level validation. If it fails, throw anaoppropriate message box and then set focus to the control in the first column from the left of the values that are checked. (In the example above, thetext is left of weirdnr, so set focus to thetext.)
Part 2:
The columns can now be rearranged in any order. Despite this: The coontrol-level validations should still set focus to thecorrect control.
The column-level validations done at the start of the row-levelvalidation should be done in the order current then left-to-right. NOTE THAT THIS COULD NOW BE A DIFFERENT ORDER.
The row-level validation should still set focus to the leftmostinvolved control. NOTE THAT THIS MIGHT BE A DIFFERENT CONTROL. (Example: If weirdnr gets moved to the left of thetext, row-level validation failing should set focus to weirdnr.)
This is basic functionality that I want/need. I have been unableto get this to work with VFP's Grid despite my efforts.
[snip]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
I was hoping that I would get Gene's response first as it really was a quick and dirty thing to show him how it could be done, but if others are interested I guess it won't hurt to have more eyes on it:
https://drive.google.com/file/d/1mR9CS02c3xr20-Y-sVr2B6cxAvsM8APh/view?usp=s...
Let me know if there is a problem downloading the file as I generally don't share files this way, so may have made a silly mistake when trying to share it.
Frank.
Frank Cazabon
On 10/01/2019 11:25 AM, Koen Piller wrote:
Frank Would you mind to e-mail me the link also? Regards Koen
Op do 10 jan. 2019 om 15:06 schreef Frank Cazabon frank.cazabon@gmail.com
Gene,
I've knocked up a quick demo which I hope meets your requirements and emailed you the link to the download on google drive.
Frank.
Frank Cazabon
On 09/01/2019 02:52 PM, Gene Wirchenko wrote:
At 05:28 2019-01-08, Frank Cazabon frank.cazabon@gmail.com wrote:
Gene, back in April last year you were asking if anyone could write code to your specification regarding the grid problems you were having. I don't recall ever seeing your specification, maybe if you posted it someone might be able to do the code for you.
At that time, I was also having difficulties posting to thelist. I thought I had come up with something, but maybe, it did not make it and I mistakenly deleted it. Let me specify something simple:
Consider a cursor or table of: thetext c(20) evennr n(3) weirdnr n(3)The validations are: thetext>"" evennr%2=0 weirdnr%3=0 and the row-level validation is: asc(thetext)%2=weirdnr%2
When a control-level validation error occurs, throw anappropriate message box and then set focus to the control with the erroneous value.
For a row-level validation:
- All control-level validations should be done first. Start with
the current control, then do all the others from left to right. The first that fails gets the message box, and checking stops.
Then, do the row-level validation. If it fails, throw anaoppropriate message box and then set focus to the control in the first column from the left of the values that are checked. (In the example above, thetext is left of weirdnr, so set focus to thetext.)
Part 2:
The columns can now be rearranged in any order. Despite this: The coontrol-level validations should still set focus to thecorrect control.
The column-level validations done at the start of the row-levelvalidation should be done in the order current then left-to-right. NOTE THAT THIS COULD NOW BE A DIFFERENT ORDER.
The row-level validation should still set focus to the leftmostinvolved control. NOTE THAT THIS MIGHT BE A DIFFERENT CONTROL. (Example: If weirdnr gets moved to the left of thetext, row-level validation failing should set focus to weirdnr.)
This is basic functionality that I want/need. I have been unableto get this to work with VFP's Grid despite my efforts.
[snip]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
Frank, Downloading and installing the file Gene.zip was easy done succesfull. The form: I am not able to enter a value in column #Weird if I have entered 8 in the column text. Is that how it is supposed to work? Regards, Koen
Op do 10 jan. 2019 om 16:36 schreef Frank Cazabon frank.cazabon@gmail.com:
I was hoping that I would get Gene's response first as it really was a quick and dirty thing to show him how it could be done, but if others are interested I guess it won't hurt to have more eyes on it:
https://drive.google.com/file/d/1mR9CS02c3xr20-Y-sVr2B6cxAvsM8APh/view?usp=s...
Let me know if there is a problem downloading the file as I generally don't share files this way, so may have made a silly mistake when trying to share it.
Frank.
Frank Cazabon
On 10/01/2019 11:25 AM, Koen Piller wrote:
Frank Would you mind to e-mail me the link also? Regards Koen
Op do 10 jan. 2019 om 15:06 schreef Frank Cazabon <
frank.cazabon@gmail.com>
Gene,
I've knocked up a quick demo which I hope meets your requirements and emailed you the link to the download on google drive.
Frank.
Frank Cazabon
On 09/01/2019 02:52 PM, Gene Wirchenko wrote:
At 05:28 2019-01-08, Frank Cazabon frank.cazabon@gmail.com wrote:
Gene, back in April last year you were asking if anyone could write code to your specification regarding the grid problems you were having. I don't recall ever seeing your specification, maybe if you posted it someone might be able to do the code for you.
At that time, I was also having difficulties posting to thelist. I thought I had come up with something, but maybe, it did not make it and I mistakenly deleted it. Let me specify something simple:
Consider a cursor or table of: thetext c(20) evennr n(3) weirdnr n(3)The validations are: thetext>"" evennr%2=0 weirdnr%3=0 and the row-level validation is: asc(thetext)%2=weirdnr%2
When a control-level validation error occurs, throw anappropriate message box and then set focus to the control with the erroneous value.
For a row-level validation:
- All control-level validations should be done first. Start with
the current control, then do all the others from left to right. The first that fails gets the message box, and checking stops.
Then, do the row-level validation. If it fails, throw anaoppropriate message box and then set focus to the control in the first column from the left of the values that are checked. (In the example above, thetext is left of weirdnr, so set focus to thetext.)
Part 2:
The columns can now be rearranged in any order. Despite this: The coontrol-level validations should still set focus to thecorrect control.
The column-level validations done at the start of the row-levelvalidation should be done in the order current then left-to-right. NOTE THAT THIS COULD NOW BE A DIFFERENT ORDER.
The row-level validation should still set focus to the leftmostinvolved control. NOTE THAT THIS MIGHT BE A DIFFERENT CONTROL. (Example: If weirdnr gets moved to the left of thetext, row-level validation failing should set focus to weirdnr.)
This is basic functionality that I want/need. I have been unableto get this to work with VFP's Grid despite my efforts.
[snip]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
There is validation according to Gene's rule:
On 10/01/2019 12:10 PM, Koen Piller wrote:
the row-level validation is: asc(thetext)%2=weirdnr%2
Frank, Downloading and installing the file Gene.zip was easy done succesfull. The form: I am not able to enter a value in column #Weird if I have entered 8 in the column text. Is that how it is supposed to work? Regards, Koen
Is it that you are getting the message regarding that validation?
Frank.
Frank Cazabon
Yes and still I cannot enter any value in weird Regards Koen
Op do 10 jan. 2019 om 17:59 schreef Frank Cazabon frank.cazabon@gmail.com
There is validation according to Gene's rule:
On 10/01/2019 12:10 PM, Koen Piller wrote:
the row-level validation is: asc(thetext)%2=weirdnr%2
Frank, Downloading and installing the file Gene.zip was easy done succesfull. The form: I am not able to enter a value in column #Weird if I have
entered
8 in the column text. Is that how it is supposed to work? Regards, Koen
Is it that you are getting the message regarding that validation?
Frank.
Frank Cazabon
[excessive quoting removed by server]
Give me examples of what you are entering. I enter The Text as 5, Even # as 2 and Weird # as 3 successfully because 5 % 2 = 1 and 3 % 2 = 1.
Frank.
Frank Cazabon
On 10/01/2019 04:03 PM, Koen Piller wrote:
Yes and still I cannot enter any value in weird Regards Koen
Op do 10 jan. 2019 om 17:59 schreef Frank Cazabon frank.cazabon@gmail.com
There is validation according to Gene's rule:
On 10/01/2019 12:10 PM, Koen Piller wrote:
the row-level validation is: asc(thetext)%2=weirdnr%2 Frank, Downloading and installing the file Gene.zip was easy done succesfull. The form: I am not able to enter a value in column #Weird if I have
entered
8 in the column text. Is that how it is supposed to work? Regards, Koen
Is it that you are getting the message regarding that validation?
Frank.
Frank Cazabon
[excessive quoting removed by server]
Control not constrained to digits only?
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:19 PM To: profoxtech@leafe.com Subject: Re: AW: Custom Scrollbar
Give me examples of what you are entering. I enter The Text as 5, Even # as 2 and Weird # as 3 successfully because 5 % 2 = 1 and 3 % 2 = 1.
Frank.
Frank Cazabon
On 10/01/2019 04:03 PM, Koen Piller wrote:
Yes and still I cannot enter any value in weird Regards Koen
What control? The text?
This is a quick knock up for Gene to check out, all I've put in is what he specifically asked for so it's a bare minimum thing.
On 10 January 2019 16:23:50 GMT-04:00, Richard Kaye rkaye@invaluable.com wrote:
Control not constrained to digits only?
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:19 PM To: profoxtech@leafe.com Subject: Re: AW: Custom Scrollbar
Give me examples of what you are entering. I enter The Text as 5, Even # as 2 and Weird # as 3 successfully because 5 % 2 = 1 and 3 % 2 = 1.
Frank.
Frank Cazabon
On 10/01/2019 04:03 PM, Koen Piller wrote:
Yes and still I cannot enter any value in weird Regards Koen
[excessive quoting removed by server]
The column with the valid rule. Is it only allowing digits to be entered? I would expect a data type mismatch if it was allowing anything other than digits. Maybe Koen is trying to type alpha characters?
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:40 PM To: profoxtech@leafe.com Subject: RE: AW: Custom Scrollbar
What control? The text?
This is a quick knock up for Gene to check out, all I've put in is what he specifically asked for so it's a bare minimum thing.
On 10 January 2019 16:23:50 GMT-04:00, Richard Kaye rkaye@invaluable.com wrote:
Control not constrained to digits only?
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:19 PM To: profoxtech@leafe.com Subject: Re: AW: Custom Scrollbar
Give me examples of what you are entering. I enter The Text as 5, Even # as 2 and Weird # as 3 successfully because 5 % 2 = 1 and 3 % 2 = 1.
Frank.
Frank Cazabon
On 10/01/2019 04:03 PM, Koen Piller wrote:
Yes and still I cannot enter any value in weird Regards Koen
[excessive quoting removed by server]
All columns have different validation rules. There is no input mask to force the text column to only accept numbers. You can put alphabetic characters in there too. Then it uses the rule specified earlier by Gene. You can download it and look at it and read Gene's specification in his last message here.
On 10 January 2019 16:43:54 GMT-04:00, Richard Kaye rkaye@invaluable.com wrote:
The column with the valid rule. Is it only allowing digits to be entered? I would expect a data type mismatch if it was allowing anything other than digits. Maybe Koen is trying to type alpha characters?
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:40 PM To: profoxtech@leafe.com Subject: RE: AW: Custom Scrollbar
What control? The text?
This is a quick knock up for Gene to check out, all I've put in is what he specifically asked for so it's a bare minimum thing.
On 10 January 2019 16:23:50 GMT-04:00, Richard Kaye rkaye@invaluable.com wrote:
Control not constrained to digits only?
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:19 PM To: profoxtech@leafe.com Subject: Re: AW: Custom Scrollbar
Give me examples of what you are entering. I enter The Text as 5, Even
# as 2 and Weird # as 3 successfully because 5 % 2 = 1 and 3 % 2 = 1.
Frank.
Frank Cazabon
On 10/01/2019 04:03 PM, Koen Piller wrote:
Yes and still I cannot enter any value in weird Regards Koen
[excessive quoting removed by server]
Ah. OK. I was just tossing out a possible reason why it works for you but not Koen and "bad" data entry is the first thing that came to mind. Actually reviewing the code would mean I would have to ignore the day job... 😊
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:48 PM To: profoxtech@leafe.com Subject: RE: AW: Custom Scrollbar
All columns have different validation rules. There is no input mask to force the text column to only accept numbers. You can put alphabetic characters in there too. Then it uses the rule specified earlier by Gene. You can download it and look at it and read Gene's specification in his last message here.
On 10 January 2019 16:43:54 GMT-04:00, Richard Kaye rkaye@invaluable.com wrote:
The column with the valid rule. Is it only allowing digits to be entered? I would expect a data type mismatch if it was allowing anything other than digits. Maybe Koen is trying to type alpha characters?
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:40 PM To: profoxtech@leafe.com Subject: RE: AW: Custom Scrollbar
What control? The text?
This is a quick knock up for Gene to check out, all I've put in is what he specifically asked for so it's a bare minimum thing.
On 10 January 2019 16:23:50 GMT-04:00, Richard Kaye rkaye@invaluable.com wrote:
Control not constrained to digits only?
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Frank Cazabon Sent: Thursday, January 10, 2019 3:19 PM To: profoxtech@leafe.com Subject: Re: AW: Custom Scrollbar
Give me examples of what you are entering. I enter The Text as 5, Even
# as 2 and Weird # as 3 successfully because 5 % 2 = 1 and 3 % 2 = 1.
Frank.
Frank Cazabon
On 10/01/2019 04:03 PM, Koen Piller wrote:
Yes and still I cannot enter any value in weird Regards Koen
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/7D475E50-5AB6-4025-8AB5-D9A4255B06B7@... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Report [OT] Abuse: http://leafe.com/reportAbuse/7D475E50-5AB6-4025-8AB5-D9A4255B06B7@gmail.com