Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Program to read my wifes mind...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00680594
Message ID:
00682639
Vues:
26
Actually, I think I've got a bug because everytime I use RespondToWife I get the GetPreviousMistake event. Worse, I try debugging and can't understand what's happening!!

>LOL. Of course, the oWifeMemory object persists a lot longer than the oHusbandMemory object, often as long as oHusband.Alive = .T. and somtimes even longer. OTOH, your basic oHusbandMemory object goes out of scope quite frequently, particularly if there was a football game, with the result that oHusbandMemory.GetMyPreviousMistakes() usually returns NULL.
>
>>Try this:
>>
>>
>>FUNCTION MakeWifeHappy
>>** This function should be called when
>>** oWifeMemory.GetPreviousMistakes()
>>** event fires
>>
>>lAdmitMistake = .T.
>>
>>IF lDidLast = lBoughtGift
>>    DO FixHouseHoldItem
>>ELSE
>>    DO BuyWifeGift
>>ENDIF
>>IF oWife.CheckStatus # CONST_WIFEHAPPY
>>    = MakeWifeHappy()
>>ENDIF
>>RETURN .T.
>>

>>
>>Here is a function for having a conversation with your wife during a football game:
>>
>>
>>FUNCTION RespondToWife
>>nRandNumber = RIGHT(TRAN(RAND()),1)
>>DO CASE
>>    CASE nRandNumber $ "16"
>>        RETURN "Yes, dear"
>>    CASE nRandNumber $ "27"
>>        RETURN "You don't say."
>>    CASE nRandNumber $ "38"
>>        RETURN "That's interesting"
>>    CASE nRandNumber $ "49"
>>        RETURN "Hmmmm"
>>    CASE nRandNumber $ "50"
>>        RETURN "OK"
>>ENDCASE
>>
Paul G Brown, MCSD
Paul G Brown
paul@paulgbrown.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform