Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subject and observer question
Message
From
24/01/2002 11:56:42
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Subject and observer question
Miscellaneous
Thread ID:
00609821
Message ID:
00609821
Views:
39
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
Map
View

Click here to load this message in the networking platform