Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with buffering / tablerevert() / getfldstate()
Message
De
07/09/1999 03:33:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00260571
Message ID:
00261863
Vues:
29
>i have some odd problem using tablerevert(), here is what's happening...
>
>my app has a view
>i have table buffering on
>i edit the view through a grid on a form
>the form is closed by a button on a toolbar
>when the form is closed, i detect changes and prompt to save
>i detect changes using the interactivechange event on the control in the grid cell rather than than getfldstate()
>based on the response, i use tableupdate() or tablerevert()
>
>the case giving problems is not saving changes, which issues the tablerevert()
>
>the next time i want to use the same view, i get an error saying the view has uncommitted changes
>
>i have narrowed it down to this......
>
>if i make the change to the grid cell and then give some other grid cell or form object the focus, i detect the change because the interactivechange event fired and getfldstate() detects the change
>
>when i leave the cursor in the grid cell after making the changes and close the form, i detect the change because the interactivechange event fired, prompt to save and use tablerevert(). getfldstate() does not detect the changes right away. after i hide the form and the toolbar, getfldstate() will detect the changes.
>
>the odd thing is that i put in 5 consecutive calls to getfldstate() and the changes are detected on calls 2 thru 5.
>
>thank you for any assistance,
>pbd
Paul,
If focus moves when you're on an edited cell, changes wouldn't be detected at that time. Let's say you go on a row and edit first_name field and w/o tabbing or pressing enter or alike you click on CheckChanges button. There it wouldn't catch the First_name field change till a tableupdate, revert etc is executed. To overcome it place :
this.value = this.value
in beforerowcolchange event of grid.
In 5 consecutive calls it's normal changes are detected thorough 2-5 for this reason. In first call it goes undetected.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform