Information générale
Catégorie:
The Mere Mortals Framework
Titre:
Subject and observer question
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement