Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subject and observer question
Message
From
25/01/2002 02:39:45
Paul Williamson
Williamson Enterprises, Inc.
Livingston, Montana, United States
 
 
To
24/01/2002 11:56:42
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00609821
Message ID:
00610321
Views:
19
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
Map
View

Click here to load this message in the networking platform