General information
Category:
The Mere Mortals Framework
Title:
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.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only