See https://www.screencast.com/t/mQEK40Tqp.
I don't understand how the thisform.txtDraftingRate.Value is not equal to 1 as well? Causing a bug in my code at the moment.
tia, --Michael
What do you see in the property sheet when editing the form, Mike?
Set a breakpoint on that control value and run your form object.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of MB Software Solutions, LLC Sent: Tuesday, December 17, 2019 5:33 AM To: profoxtech@leafe.com Subject: Twilight zone moment for textbox value being different than what it's controlsource evaluates to
See https://www.screencast.com/t/mQEK40Tqp.
I don't understand how the thisform.txtDraftingRate.Value is not equal to 1 as well? Causing a bug in my code at the moment.
tia, --Michael
There are a lot of times that the Value of a textbox is different from its underlying ControlSource. If the control has the focus and the Value is updated, either programmatically or interactively, the Control's Value has not been run through the Valid() method and could be different, even invalid, without affecting the ControlSource. This is a feature, not a bug, we use in InteractiveChange() or ProgrammaticChange() to react to changes in Value without affecting the underlying data. Then, there's the whole discussion of buffering.
So, perhaps you can tell us a little bit more of the context of when this happens.
If you can't reproduce it in a simple example, then it is something with your code, environment or framework, and that's kinda hard for us to guess.
On Tue, Dec 17, 2019 at 5:34 AM MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
See https://www.screencast.com/t/mQEK40Tqp.
I don't understand how the thisform.txtDraftingRate.Value is not equal to 1 as well? Causing a bug in my code at the moment.
tia, --Michael
[excessive quoting removed by server]
Sorry for the brevity. Will expand later if some more workaround attempts fail. I do appreciate everyone's 2 cents, regardless. Thank you!
On 12/17/2019 9:22 AM, Ted Roche wrote:
There are a lot of times that the Value of a textbox is different from its underlying ControlSource. If the control has the focus and the Value is updated, either programmatically or interactively, the Control's Value has not been run through the Valid() method and could be different, even invalid, without affecting the ControlSource. This is a feature, not a bug, we use in InteractiveChange() or ProgrammaticChange() to react to changes in Value without affecting the underlying data. Then, there's the whole discussion of buffering.
So, perhaps you can tell us a little bit more of the context of when this happens.
If you can't reproduce it in a simple example, then it is something with your code, environment or framework, and that's kinda hard for us to guess.
On Tue, Dec 17, 2019 at 5:34 AM MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
See https://www.screencast.com/t/mQEK40Tqp.
I don't understand how the thisform.txtDraftingRate.Value is not equal to 1 as well? Causing a bug in my code at the moment.
tia, --Michael
[excessive quoting removed by server]
Thanks so much, Ted. This was solved with a simple thisform.refresh in my thisform.Show event. Can't get any easier than that.
Admittedly, I never liked InteractiveChange so I rarely ever use it if I can avoid it, and in my 20+ years of the Fox, I've not used ProgrammaticChange but I could see me doing that at some point perhaps.
Merry Kwanstmasukah or Festivus season, whichever suits you!
On 12/17/2019 9:22 AM, Ted Roche wrote:
There are a lot of times that the Value of a textbox is different from its underlying ControlSource. If the control has the focus and the Value is updated, either programmatically or interactively, the Control's Value has not been run through the Valid() method and could be different, even invalid, without affecting the ControlSource. This is a feature, not a bug, we use in InteractiveChange() or ProgrammaticChange() to react to changes in Value without affecting the underlying data. Then, there's the whole discussion of buffering.
So, perhaps you can tell us a little bit more of the context of when this happens.
If you can't reproduce it in a simple example, then it is something with your code, environment or framework, and that's kinda hard for us to guess.
On Tue, Dec 17, 2019 at 5:34 AM MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
See https://www.screencast.com/t/mQEK40Tqp.
I don't understand how the thisform.txtDraftingRate.Value is not equal to 1 as well? Causing a bug in my code at the moment.
tia, --Michael
[excessive quoting removed by server]