Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ReadOnly Bug?
Message
 
 
À
24/03/2001 18:05:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00488361
Message ID:
00488412
Vues:
8
>>>Here’s the real code, as modified to make it work with macro expansion: (used to make a list of editable tables on each page of a pageframe)
>>>
>>>FOR EACH loControl IN this.parent.Controls
>>> IF TYPE("loControl.ControlSource") <> "U" ;
>>> AND NOT EMPTY(loControl.ControlSource) ;
>>> AND loControl.Enabled ;
>>> AND NOT loControl.&lcReadOnly
>>>
>>>It’s in a programmatically defined class (.prg) and gives me the error on program compile as well as at run time, so object properties have no effect. The error is “command contains unrecognized phrase/keyword.” I tried retyping, cut & paste, etc. about 14 ways to make sure I wasn’t making a typo; it happens every time. Also ran it on another development machine with a different VFP install; same result.
>>
>>
>>It's weird. Could you try to create visual analogue (just for test), write this code, then save it as a prg through Class Browser?
>>
>>Really strange.
>
>Very. I had declared loControl as local also. I just tried the same construct in another .prg file, and it worked fine! Go figure. I also tried the visual analog, as you suggested, and that works as well. So just in my common utility procedures file I have this unexplained gremlin. Mystery: so how come it appears both at program compile and runtime?

Well, now the problem narrows down to your utility. I would start from searching ReadOnly in this utility. You might have a function with this name, or variable, or #define constant (I suspect the latest). In this case you would have this error.

Also check, if you have comments which end with semicolon. I recently had this problem in one of my program and it took ~half of hour or more do debug it.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform