Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
THISFORM can only be used within a method
Message
From
12/01/2007 12:09:28
 
 
To
12/01/2007 11:55:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01185055
Message ID:
01185108
Views:
21
>>I know - that old chestnut
>>
>>I've made some changes to a form and since, whenever I click on a particular combo, the first time, I get:
>>
>>"THISFORM can only be used within a method".
>>
>>I've tried to trace where in debug, even to putting some dummy code in the combo's .GotFocus(), but it follows the code then the message appears from nowhere. Now, I have no code outside the form's methods, referenced anywhere in the form, that includes "Thisform", nor is that the among any of the changes I made. The 2nd time I click on the combo it behaves properly.
>>
>>The only code I have in the combo is in the .InteractiveChange() and this isn't reached (in debug) before the error message.
>>
>>I was using some "thisform.cRouteNo" in a filter string , and in an SQL statement, which I vaguely remember VFP7 doesn't like, so first loaded a method var with this and substitued this in the strings, but made no difference (and indeed these snippets aren't reached first anyway.
>>
>>This has got me baffled. Any ideas
>>
>>'ppreciate it
>>
>>Terry
>
>Terry,
>
>Do you have any code/function in a skip for clause of a menu item popup that contains 'thisform' ?

No. Besides, I'm not using the menu but testing the form stand-alone. Stand by - I'm homing in on it. The problem is in the form's .Init() but the offending line is giving me a invalid func, arg, value err at the moment.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform