Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subject and observer question
Message
De
24/01/2002 11:56:42
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Subject and observer question
Divers
Thread ID:
00609821
Message ID:
00609821
Vues:
38
In implementing subject and observer for the first time, I was having trouble with this code (suggested by the MM devguide) in the observer (agent_list) ProcessUpdate method:

if lcType = "agent"
do case
case lcState = 'SAVE'
thisform.Agent_list.requery()
otherwise
return .f.
endcase
endif

The code was bombing out with "operator/operand type mismatch" because lcType always evaluated to .f.

Changing the code to this solved the problem:

do case
case lcState = 'SAVE'
thisform.Agent_list.requery()
otherwise
return .f.
endcase

Question: is this a workaround? Will it cause me problems? Am I ignoring a larger problem?

TIA.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform