Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetFldState and Alias not found troubles
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00055703
Message ID:
00055764
Views:
57
>>>>>>>I am getting a migraine headache over this one. I am just starting a new app and testing with 3 forms. One is against a base table, the other 2 are against local views. They all use private data sessions and optimistic row locking. I have 2 major headaches:
>>>>>>>
>>>>>>>1. After I've saved a record VFP 3.0b still thinks I have dirty buffers. It was driving me nuts, so I added a little routine to my form (I'm testing with the one that's using a base table to make things simpler), after the save method runs. All it does is display oldval and curval as well as what's in the buffer. All of the values match after the save. Immediately after this, I put the line wait window getfldstate(-1) and it shows up with a 2 in the string! What gives? Got any ideas?
>>>>>>
>>>>>>what column is it in? does it still show [immediately after] after tableupdate()?
>>>>>>>
>>>>>>>2. When testing with one of the forms against a local view, when I select the exit option from my main menu, I get an error in the goapp.cleaup() when it is releaing this form. The error says "lv_Region alias not found" but if I suspend, go to the command window, and type DISPLAY STATUS, lv_region is there!
>>>>>>>
>>>>>>>Has anyone ever experienced anything like this? I'm lost.
>>>>>>>
>>>>>>>TIA
>>>>>>>
>>>>>>>Marcia
>>>>>Hi Dave.
>>>>>
>>>>>Depending on which field I changed originally, it shows up in a different column. And, yes, it still shows up immediately after tableupdate(). An interesting point, if I change 2 fields and save, it changes the 2 corresponding to the first field to a 1, but no matter how many times I save, the last changed field never has its status changed in getfldstate(-1). And the record REALLY is saved! If I exit the form and go back in, all of my changes are there. BTW, this is not an issue where eval(this.controlsource) this.value. I handle that before invoking my save method.
>>>>>
>>>>>So, what do you think?
>>>>>
>>>>>Marcia
>>>>
>>>>Try issuing the tableupdate() and the getfldstate() with the aliases to make sure that you are updating and checking he status of the tables that you think you are.
>>>>
>>>>tableupdate(1, .T., 'mytable')
>>>>getfldstate(-1, 'mytable')
>>>
>>>
>>>Marcia, do you have any controls other than text boxes? I've found the change in Getfldstate(-1) with combos when I get the correct record using the "..MyCombo.value = Mytable.field" syntax. If you have a refresh command, check before and after it.
>>>
>>>Barbara
>>Hi Barbara.
>>
>>As a matter of fact, I do have 2 combos on the form. I will follow up on that and let you know what I find. Got any ideas about #2?
>>
>>Thanks.
>>
>>Marcia
>
>Umm... First, check to see if OApp is looking for the file name, which would be something like 490a2459.dbf, and second, check to see if the variable name you used for the alias is out of scope. Anyway, lv_region sounds like a local variable name.
>
>HTH
>Barbara
Hi Barbara.

goApp isn't looking for anything at the point that this occurs. The alias isn't a variable, this is a local view I created using the view designer and it is stored in the dbc. The error is occuring in the loop where goApp.cleanup() is releasing all the active forms. It occurs on the last form to be released, and it's stopping on the line _Screen.Activeform.Release().

Best Regards.

Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform