Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crazy Syntax Error (solved, but strange)
Message
 
 
À
16/03/2004 17:42:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00886890
Message ID:
00886963
Vues:
19
David,

Does this work?
loAxis = chart.Axis(2)
WITH loAxis
   .Title = "Leasing Agents"
   .TitleFont.Size = 10
   .Step = 1
ENDWITH
>You might enjoy this one...
>
>Setting properties on a COM component to create a chart today, and had this block of code:
>
>WITH chart.Axis(2)
>   .Title = "Leasing Agents"
>   .TitleFont.Size = 10
>   .Step = 1
>ENDWITH
>
>This caused a syntax error on the .Step assignment. I tried everything I could think of to work around it and finally found a way to make it work by calling an external prg from outside the WITH structure with just this line of code:
>
>   chart.Axis(2).Step = 1
>
>However, calling the same line of code in a function inside the original prg would fail. Finally, a few mintues ago I discovered that this will work in the original WITH block:
>
>   STORE 1 TO ('.Step')
>
>Any idea why the first way confused VFP so much?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform