Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid and GotFocus events
Message
From
31/12/2012 15:13:33
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01560981
Message ID:
01560990
Views:
71
Put a SET STEP ON above your first WAIT WINDOW and see the values there manually.

I know it's not a popular thing to do, but you could put a timer on your form firing once ever 20ms or so, to examine the values there and if they have changed, or if they are not what you're expecting, issue a this.Enabled = .f. and then SET STEP ON for you to examine in your code. You'll get a hint as to what was happening when it was changed. Then you can break at some prior point and use a breakpoint that is "break when expression has changed" to locate when it changes. Make sure you use the fully qualified variable name as the code's instruction pointer will move in and out of "this" and "thisForm" objects as events fire. Something like:

IIF(_screens.forms(1).Name = "yourFormName", _screen.forms(1).myObject.myOtherObject.myVariable = whatYouExpectItToBe, .t.)

Then you can find on either the immediate code or call stack what caused it to change.


>Hi everybody,
>
>I am trying the following code in the Valid even of the complex class
>
>
>WAIT WINDOW TIMEOUT 1 this.currentdatetime
>WAIT WINDOW TIMEOUT 1 'Valid'
>if NOT ISNULL(this.CurrentDatetime) AND this.value <> this.CurrentDatetime && if value changed
>	if not this.parent.parent.VerifyEntry(this.value)
>		return 0
>	endif
>endif
>
>and the first window never shows up. Why this may be and how can I test the value of the current date time property? It seems to be not set correctly although GotFocus is supposed to set it to the value and I only want to fire the VerifyEntry method if the value actually changed.
>
>I had originally
>
>if this.value = this.CurrentDatetime
>   ** do nothing
>else
>   ***
>endif
>
>and I think when I had it this way, nothing happened. Now my verification happens even if the value didn't change.
>
>I am not sure how to make this work correctly.
>
>Do you see where the error in my logic is?
>
>Thanks in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform