Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record pointer - moving at a THISFORM.Refresh()
Message
From
17/03/2001 01:45:39
 
 
To
16/03/2001 09:57:46
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00485753
Message ID:
00486223
Views:
12
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform