Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Severe situation on bug
Message
 
 
À
30/07/2001 11:49:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00537068
Message ID:
00537294
Vues:
28
Hi!

The count does fire error on my machine, but it also shows ShowMessage1 twice that means that return to command work badly - it returns to the ShowMessage first routine well, but does not clean up stack, thus return from ShowMessage seems returns again to the message box running the rest of the code after COUNT twice.

Well, I did pressed the Cancel each time open dialog appears for count command. I see from this thread that opening the table makes difference.

Tried with opened table and finally got what Michelmentioned in starting thread - Messagebox2 and than Messagebox1.

Weird, but if you think some more about internal VFP work...

Think about the RETRY command. To make it work and correctly continue the process like COUNT command it require to store that process state. So it is organized (my guess only) as an additional procedure call on the internal lvel when error is happened. Now, when you use return to command, it is confused about the number of routines it require to skip in the stack to return to requested routine, because the last routine is really not visible for return to command - it is internal to VFP. This cause strange behavior.

Did some actions - made one more level of nesting of procedres, and weirdness when I hit Cancel to open dialog box disappeared... Than returned back to the 2 methods, and did not managed to reproduce the behavior again (When ShowMessage1 appeared twice).

Even more weird. Tried to play around RETURN TO with no luck.
Michel, if you want to return from developer code to the main routine skipping all statements, seems you require to switch to the empty workarea before return to command.

Try following error method. If you run it in the automation server, the open dialog box should not appear. The idea is to retry command without alias so it behaves normal way for return to command:
FUNCTION Error
PARAMETER nError,cMethod,nLine
if !empty(alias()) and !this.lFirstTry
	select 0
	retry
        this.lFirstTry = .T.
endif
this.lFirstTry = .F.
RETURN TO ShowMessage
ENDFUNC
>>I get the same behaviour as you...running VFP6 SP5. The error method does run, but it is as if the RETURN TO ShowMessage is ignored when using the COUNT statement. You just have to figure out what is different about Vlad's configuration and yours...
>
>As confirmed by Vlad, he mentioned that count doesn't fire an error. That is a really severe issue.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform