Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's wrong with this variable?
Message
De
08/08/2003 16:57:26
 
 
À
08/08/2003 16:47:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00818431
Message ID:
00818445
Vues:
25
You lost me here. I don't see the connection between your questions and my question.
What I'm doing here is testing to see if a form's parent is minimized, and if it is set it back to normal. If the form doesn't have a parent, then it's ignored. The fact that I'm calling it from within a form by definition means a form is open. The fact that the forms collection has toolbars is immaterial.

>Two things come to mind:
>
>1. The Forms collection also holds toolbars
>2. What happens if no forms are open?
>
>>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
>>
Bill Morris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform