Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clear Events isn't
Message
From
29/01/2013 14:33:01
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01564509
Message ID:
01564560
Views:
39
>>>>Hey Guys
>>>>
>>>>This is an issue I usually don't have a problem with, but here it is
>>>>
>>>>Application starts,
>>>>VFP desktop hidden
>>>>Main form fires off
>>>>Main form issues Clear Events and closes
>>>>
>>>>(Update)
>>>>After the Clear Events is issued and before the form closes, it goes through the GotFocus of a textbox (the only interactive object on the screen)
>>>>
>>>>VFP desktop doesn't Clear - get 'cannot close FoxPro' window
>>>
>>>What does a trace show you. What happens in GotFocus? What code runs after that?
>>>
>>>Try scattering a bunch of DEBUGOUTs in the code along with turning on the event tracker to see exactly what's happening. If that doesn't give you the necessary clue, try running with coverage on and walk through the coverage log to see exactly what's happening.
>>>
>>>Tamar
>>
>>
>>I have since removed the code from the GotFocus event after I realized that it was redundant.
>>
>>Here's the code in question and is in the LostFocus of the TextBox
>>
>>If QstCnt > TotNum
>>  If TestSection = 'L'
>>    TestSection = 'R'
>>    QstCnt = 1
>>    AnsString = ""
>>    Thisform.m_getlist
>>    If TestSection = 'L'
>>      Thisform.Caption = "Listening Tutorial"
>>    Else
>>      Thisform.Caption = "Reading Tutorial"
>>    Endif
>>    This.Value = ""
>>    Thisform.Refresh()
>>  Else
>>    =Messagebox("This is the end of the Test", 64)
>>    Thisform.r_QuitForm = .T.
>>@    Clear Events
>>@    Thisform.Release
>>@  Endif
>>@Else
>>  ** Get next question
>>
>>
>>The lines that have the '@' sign are the lines it hits. It returns to the calling program
>>
>>do form DispQuestions
>>read events
>>Clear Events
>>
>>and sits on the read events
>>
>>Like I said before, I've never had this problem before - and it's a little crazy making, especially since I have a VERY short turnaround on this.
>
>Keep thisform.Release() and move CLEAR EVENTS to the Destroy method of the form. Also, this is the first time I see releasing the form from the LostFocus instead of the button's code.

There is no button for the code - and this has always worked prior to this.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Reply
Map
View

Click here to load this message in the networking platform