Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unknown member using WITH....ENDWITH
Message
De
12/03/2002 10:00:50
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Unknown member using WITH....ENDWITH
Divers
Thread ID:
00631488
Message ID:
00631488
Vues:
52
I'm sure I'll slap myself silly when somebody answers this but I don't see what is causing the error.

I inherited a VFP 6 application which was converted from FPD 2.5 using the conversion programs. The converter apparantly takes the FPD screens and turns them into a FormSet. There is one Form in the FormSet. The INIT method of this form has the following code
*-- RCM 06/11/01 Enable editing of payment type on loss policies.
IF CHHEADER.CASH_NOTE="C"

   THISFORM.PageFrame1.Page1.Label13.CAPTION = "Cash"
   THISFORM.PageFrame1.Page1.cmdCashToNote.ENABLED = .T.
   THISFORM.PageFrame1.Page1.cmdCashToNote.CAPTION = 'Change Payment Type to "NOTE"'
   THISFORM.PageFrame1.Page1.chkCashWithApp.VALUE = IIF(CHHEADER.CWAPP, 1,0)
   THISFORM.PageFrame1.Page1.chkCashWithApp.VISIBLE = .T.
   THISFORM.PageFrame1.Page1.lblCashWithApp.caption = "Cash with App."
ELSE
               .
               .
               .
ENDIF
I thought it would be better to code this as a WITH...ENDWITH block and converted it to
*-- RCM 06/11/01 Enable editing of payment type on loss policies.
WITH THISFORM.PageFrame1.Page1
   IF CHHEADER.CASH_NOTE="C"

      .Label13.CAPTION = "Cash"
      .cmdCashToNote.ENABLED = .T.
      .cmdCashToNote.CAPTION = 'Change Payment Type to "NOTE"'
      .chkCashWithApp.VALUE = IIF(CHHEADER.CWAPP, 1,0)
      .chkCashWithApp.VISIBLE = .T.
      .lblCashWithApp.caption = "Cash with App."
   ELSE
               .
               .
               .
   ENDIF
ENDWITH
Running this version, however, produces an "UNKNOWN MEMBER" error for each of the six lines.

Any insight as to what is wrong will be extremely appreciated.

Thanks to all.........Rich
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform