Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record pointer - moving at a THISFORM.Refresh()
Message
 
 
À
16/03/2001 09:57:46
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00485753
Message ID:
00486223
Vues:
11
Hi Charlie,

This is what coverage profiler revealed:
0.000,frmsave,frmsave.btadd.click,11,d:\foxapps\classes\primclas.vct,4
0.008,frmsave,frmsave.btadd.click,12,d:\foxapps\classes\primclas.vct,4
0.000,frmsave,frmsave.btadd.click,13,d:\foxapps\classes\primclas.vct,4
0.000,frmsave,frmsave.btadd.click,14,d:\foxapps\classes\primclas.vct,4
This corresponded to the following: (in a WITH THISFORM construct)
  nCurrRec = RECNO(cMTable)
  .Refresh
    IF nCurrRec <> RECNO(cMTable)
    SET COVERAGE TO
...which tells me that in the Refresh process, the record pointer moved, for some inexplicable reason.
A bit of background:
The LOAD ...
LOCAL cMTable, cMKey, cMsg
SET MULTILOCKS ON
WITH THISFORM
  cMTable = .cMainTable
  cMKey   = .cMainKey
  .MakeLists()
ENDWITH

IF NOT USED(cMTable)
  USE &cMTable IN 0
ENDIF
SELECT (cMTable)

IF NOT EMPTY(cMKey)
  SET ORDER TO (cMKey)
ENDIF
CURSORSETPROP('BUFFERING',2,cMTable)
A point you made was: is this an intermitent or consistent problem? Well, it occurs every time. I zapped the table and started from scratch. The first record added fine. The second behaved exactly as I described previously - in the Add.Click method, the record pointer moved to the previous record during the .Refresh of the form (this Refresh is in the class, not the instantiated form).
Colour me extremely puzzled... any ideas?
Many regards,
Robin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform