Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a service pack in the pipe
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00879242
Message ID:
00879310
Vues:
15
For you, anything:
This proc is fired via a Combo Interactive change.
* This did not work (weel it worked for one InteractiveChange. Subsequent Interactives [from the combo] did not make it to the proc. So first fire worked (went to this proc, second fire did not make it to the proc.

PROCEDURE TC_cmbRoof_Type_InterActiveChange(oform,ocmbRoof_Type) &&-
WITH ocmbRoof_Type
IF [FIX]$.Value
   IF VARTYPE(R6_FRLossFactors)==[O]
      R6_FRLossFactors.cntLFToolBar.ocxLFToolBar.buttons([LFCOPY]).enabled=.f.
      FR_ZeroLossFactors(R6_FRLossFactors)   
      FR_SETFormCaption(R6_FRLossFactors,[ (fixed n-a)])
   ELSE
   ENDIF       
   IF VARTYPE(R6_MTDLossSummary)==[O]
      *ZeroOutLossFactors
      LS_ZeroMTDLandingLossSummaries(R6_MTDLossSummary)
   ELSE
   ENDIF
   STORE 0 to oform.txtRleg_Gaft.Value,oform.txtRleg_Gain.value,oform.chkShowLandingLosses.Value
ELSE
   IF VARTYPE(R6_FRLossFactors)==[O]
      R6_FRLossFactors.cntLFToolBar.ocxLFToolBar.buttons([LFCOPY]).enabled=.t.
      IF !oform.lNewTank
         FR_PopulateLossFactors(R6_FRLossFactors)
      ELSE
      ENDIF
      FR_SETFormCaption(R6_FRLossFactors,oform.txtTank_Numb.Value)
   ELSE
   ENDIF
   IF VARTYPE(R6_MTDLossSummary)==[O]
      LS_PopulateMTD([Void])
   ELSE 
   ENDIF       
ENDIF
TC_TankConstructionHasChanged(oform) 
STORE [FLOAT]$.Value TO oform.txtRleg_Gaft.Enabled,oform.txtRleg_Gain.Enabled,;
      oform.chkShowLandingLosses.Enabled
.Setfocus
ENDWITH && ocmbRoofType
ENDPROC &&TC_cmbRoof_Type_InterActiveChange(oform,ocmbRoof_Type) &&-
*This oone works
PROCEDURE TC_cmbRoof_Type_InterActiveChange(oform,ocmbRoof_Type) &&-
WITH ocmbRoof_Type
IF [FIX]$.Value
   IF TYPE('R6_FRLossFactors')==[O]
      R6_FRLossFactors.cntLFToolBar.ocxLFToolBar.buttons([LFCOPY]).enabled=.f.
      FR_ZeroLossFactors(R6_FRLossFactors)   
      FR_SETFormCaption(R6_FRLossFactors,[ (fixed n-a)])
   ELSE
   ENDIF       
   IF TYPE('R6_MTDLossSummary')==[O]
      *ZeroOutLossFactors
      LS_ZeroMTDLandingLossSummaries(R6_MTDLossSummary)
   ELSE
   ENDIF
   STORE 0 to  oform.txtRleg_Gaft.Value,oform.txtRleg_Gain.value,;
               oform.chkShowLandingLosses.Value
ELSE
   IF TYPE('R6_FRLossFactors')==[O]
      R6_FRLossFactors.cntLFToolBar.ocxLFToolBar.buttons([LFCOPY]).enabled=.t.
      IF !oform.lNewTank
         FR_PopulateLossFactors(R6_FRLossFactors)
      ELSE
      ENDIF
      FR_SETFormCaption(R6_FRLossFactors,oform.txtTank_Numb.Value)
   ELSE
   ENDIF
   IF TYPE('R6_MTDLossSummary')==[O]
      LS_PopulateMTD([Void])
   ELSE 
   ENDIF       
ENDIF
TC_TankConstructionHasChanged(oform) 
STORE [FLOAT]$.Value TO oform.txtRleg_Gaft.Enabled,oform.txtRleg_Gain.Enabled,;
      oform.chkShowLandingLosses.Enabled
.Setfocus
ENDWITH && ocmbRoofType
ENDPROC &&TC_cmbRoof_Type_InterActiveChange(oform,ocmbRoof_Type) &&-
I also note that VARTYPE does not vette OCX objects. For two years (or so) my code has been vetting OCX exclusively with TYPE. I maintained VARTYPE for form vetting. But in 8, VARTYPE is not as reliable as it was with 7 or 6 - at least that's what I think I am seeing.

I've other issues with VARTYPE that I tried to solve with proxy names for forms and so on. They worked. But now, I suspect, that I can revert to actual object names by simply switching to TYPE.

Thanks



>I know this is just one example of your observations with 8, but can you post some repro code where we can try to duplicate you finding? I can not recall your example below ever happening to me in VFP8SP1.
>
>>Example:
>>If VARTYPE(SoAndSo)=="O"
>>   SoAndSo.Value="New Value"
>>Endif
>>I just had an incident where VFP error manager told me SoAndSo "is not an object" at SoAndSo.Value="New Value" , even though VFP vetted the test (in the line before) as true!
>>
>>I will admit this much:
>>SoAndSo is a form name, as well as a PRG name and a DBF name!
>>
>>Should I go back to 6?
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform