General information
Category:
The Mere Mortals Framework
Hi Bob,
>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:
<
I'm sorry, I am not familiar with that (as I am still a new guy w/ MM), but perhaps I am being naiive and I shouldn't be posting this late at night ....
If this is your code, not the framework's:
>
>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.
>
Did lcType ever get set to something (i.e., lcType = "", or whatever. Looks like it must be a character)?
>Changing the code to this solved the problem:
>
> do case
> case lcState = 'SAVE'
> thisform.Agent_list.requery()
> otherwise
> return .f.
> endcase
>
Was the problem solved because you got rid of the reference to lcType?
>Question: is this a workaround? Will it cause me problems? Am I ignoring a larger problem?
Okay - I guess the point may be that it's the frameworks code and you don't know what lcType does.
If so, sorry! Any way, maybe scanning for lcType might help you.
-pw
Previous
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