Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's wrong with this variable?
Message
 
 
À
08/08/2003 16:19:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00818431
Message ID:
00819171
Vues:
14
>I'm using VFP 7.0
>
>This doesn't work
>
>myForm.method()
>  LOCAL lo, lc
>  lc = WPARENT( THIS.NAME )
>  FOR EACH lo IN _VFP.FORMS
>    IF lo.NAME == lc
>      EXIT                             && Locals window shows lo as object here
>    ENDIF
>  ENDFOR
>  IF TYPE( 'lo.NAME' ) = 'C' ;         && Locals window shows lo as .F. here
>      AND lo.WINDOWSTATE = 1
>    lo.WINDOWSTATE = 0
>  ENDIF
>
>but this does
>
>myForm.method()
>  LOCAL lo, lc, loParent
>  lc = WPARENT( THIS.NAME )
>  FOR EACH lo IN _VFP.FORMS
>    IF lo.NAME == lc
>      loParent = lo
>      EXIT                             && Locals window shows lo as object here
>    ENDIF
>  ENDFOR
>  IF TYPE( 'loParent.NAME' ) = 'C' ;   && Locals window shows lo as .F. here
>      AND loParent.WINDOWSTATE = 1
>    loParent.WINDOWSTATE = 0
>  ENDIF
>
I think FoxPro releases the FOR EACH loop counter after the loop.
- Andy Rice
San Diego, CA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform