Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subject and observer question
Message
De
25/01/2002 02:39:45
Paul Williamson
Williamson Enterprises, Inc.
Livingston, Montana, États-Unis
 
 
À
24/01/2002 11:56:42
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00609821
Message ID:
00610321
Vues:
21
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform