Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sometimes thing?
Message
 
 
À
28/03/2001 12:30:59
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00489509
Message ID:
00489906
Vues:
10
You could try refreshing each of the buttons individually. Have you tried executing without the debugger and outside of VFP, just executing your app. Do you still get inconsistent results then? Sometimes when i get inconsistent results it can be caused by the debugger because the debugger window takes focus away from the app and then puts focus back on the app, so the debugger does not always give a true picture.

Brenda

>Below are the code that I have in the end of the 'Save' button (after I do the saving part with all kinds of IF...ENDIFs). The mystery thing is sometimes the buttons are not doing the enabling/disabling prompterly. It happens when we fill the whole field in any of the fields, but sometimes not on that too. I am wondering if it's too fast or any ideas? I mean it works, but sometimes not (even when doing the same thing testing)? What happens when it does not work right is that it leaves the Add, Edit, and Esc buttons enabled and the rest (Save,Delete, and Exit) disabled. So, you can see that the Esc is after the CheckAuthForPerson Method, but the Esc button does "disable" while not greying it out (yet, the Add and Edit are ok while the supposed enabled Delete and Exit are not enabled). I am confused, can you see something that I may be overlooking? It does not crash the program or anything like that, just that we need to close the form and come back...
>
>Thanks.
>
>Chuck
>
*****************************************************

'Save' button (Command3)

This.Parent.Command1.ENABLED = .T. <- Add button
This.Parent.Command2.ENABLED = .T. <- Edit button
This.Parent.Command3.ENABLED = .F. <- Save button
*This.Parent.Command4.ENABLED = .T. <- Delete button, but the next line takes care of it, which has the code below as well
ThisForm.CheckAuthForPerson(m.id)
This.Parent.Command5.ENABLED = .T. <- Exit button
This.Parent.Command6.ENABLED = .F. <- Esc button
ThisForm.Command1.ENABLED = .T. <- another button to pop another form
ThisForm.Command2.ENABLED = .T. <- same as preivous line
ThisForm.List1.ENABLED = .T.
ThisForm.text1.ENABLED = .F.
ThisForm.text2.ENABLED = .F.
ThisForm.text3.ENABLED = .F.
ThisForm.text4.ENABLED = .F.
ThisForm.List1.Requery()
SEEK(m.id)
ThisForm.List1.Value = person.id+" "+person.logon+" "+person.name
ThisForm.List1.SetFocus()
ThisForm.Refresh()

*****************************************************
Form.CheckAuthForPerson (Form's Method)

LPARAMETERS lcPersonID
SELECT auth
SEEK lcPersonID
IF FOUND()
ThisForm.CommandGroup1.Command4.Enabled = .F.
authct = .T.
ELSE
ThisForm.CommandGroup1.Command4.Enabled = .T.
authct = .F.
ENDIF
SELECT person

>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform