Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with weird popup problem FPD 2.6
Message
De
05/11/1998 10:52:30
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgie, États-Unis
 
 
À
21/10/1998 16:20:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00149094
Message ID:
00154838
Vues:
22
>I am having a weird problem with a popup in FPD 2.6.
<snip>
>The problem is that _sometimes_ (not all the time) I make a change and by the time it gets to the valid both luOldValue and loIndGru have the new value of the index. It seems to happen more often after I do a relocation in table via a Function key.
>I read in UT that somtimes Fox seems to get ahead of itself in fast machines. Could this be one of those cases? It is alo possible that somehow I am going twice through the when without going through Valid. Could this be the problem???
>
>TIA,
>
>Alex


Alex,
If you are using an ON KEY LABEL to map the function key to the code that does the relocation, then you are processing the WHEN clause twice. The OKL interrupts the READ and, when finished, re-enters the control and fires the WHEN again.
The solution I have used is to create a logical variable in the Setup of the screen and check it before running the WHEN clause.

*: In screen setup
lRunWhen = .T. && Run the WHEN if this is .T.

*: In WHEN clause
IF lRunWhen
lRunWhen = .F. && Prevents WHEN clause from running again
-- Run the WHEN code --
ENDIF

*: In VALID clause
lRunWhen = .T. && Without this, the next WHEN will be ignored.


David.




>Hi all,
>
>I am having a weird problem with a popup in FPD 2.6.
>*---------------
>Code in When of popup:
>
>IF glReadOnly
> RETURN .F.
>ENDIF
>luOldValue = loIndGru && loIndGru is index variable to popup
>*----------------
>Code in valid of same popup:
>
>* First it sets some variables that depend on loIndGru
>ccodgru = laplgru[loIndGru,1]
>nRegHours = laplgru[loIndGru,2]
>
>* If there has been a change and it is the first time this
>* record has changed, Refesh navigation buttons
>IF luOldValue # loIndGru AND !glRecordChanged
> glRecordChanged = .T.
> DO DimNavigat && This routine dims or highlights buttons in && navigation screen
>ENDIF
>*----------------
>
>The problem is that _sometimes_ (not all the time) I make a change and by the time it gets to the valid both luOldValue and loIndGru have the new value of the index. It seems to happen more often after I do a relocation in table via a Function key.
>
>I read in UT that somtimes Fox seems to get ahead of itself in fast machines. Could this be one of those cases? It is alo possible that somehow I am going twice through the when without going through Valid. Could this be the problem???
>
>TIA,
>
>Alex
David.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform