Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debug Window moves recordsource to top of table, why?
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Debug Window moves recordsource to top of table, why?
Divers
Thread ID:
00211753
Message ID:
00211753
Vues:
57
VFP 6.0. Have the following code that edits a table that is the recordsource of a grid. Was debugging something and put an ASSERT .F. as the first statement inside the second CASE. My app no longer worked as expected. Then put in the messageboxes and found that my record pointer went back to the top of the file when the debug window opened. Without the ASSERT everything works great. With the ASSERT the recno()=4 gets inside CASE number 2, the messagebox shows recno()=4, then the ASSERT. The debugger shows recno()=1, jumping over to data session I can see the record pointer is at the first record. What is up?

SELECT PAYTEMP
LOCATE

DO WHILE !EOF()

messagebox ("!eof paytemp.prin_pmt: "+str(paytemp.prin_pmt)+ " recno: "+str(recno()),0,"debug message")

DO CASE
CASE EMPTY(paytemp.OBLIGATION)
MSG='Obligation is Required!'
CASE paytemp.PRIN_PMT = 0 AND paytemp.INT_PMT = 0

messagebox ("before assert, paytemp.prin_pmt: "+str(paytemp.prin_pmt)+ " recno: "+str(recno()),0,"debug message")
assert .f.
messagebox ("after assert, paytemp.prin_pmt: "+str(paytemp.prin_pmt)+ " recno: "+str(recno()),0,"debug message")

MSG='Interest payment or Principal payment Required!'
endcase
skip
enddo
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform