Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug? Label Caption cannot be '='?
Message
From
18/06/2003 07:03:30
 
 
To
17/06/2003 18:56:55
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00800936
Message ID:
00801095
Views:
18
Hi John,

>VFP 8.0 allows captions to be evaluated as string expressions, therefore, a "=" raises an error as VFP expects an expression to follow. You need some other character to come first.

You make me to worry.
If you write this it means that the VFP Team does not mean to correct the obvious error of the label Caption parser.

If you allow me I try to demonstrate it, and to explain of the reason.

On DE, Properties window, label Caption property write:
=[="='X'+'7'"] and confirm
no error
='X'+'7'	Caption parser have repeat evaluation until first char is <>'='
write
=[="='X'+'7'"+"6"]
Syntax error
="='X'+'7'"+"6" Caption parser pass first cycle, but stop on second
Because iterate evaluation is not need, for remove this bug enough to remove the iterative cycle.

On program Class property this problem not occur ( the evaluation is not made from the Caption parser),

but on program code yes.
public oForm
oForm = CREATEOBJECT("myForm")
oForm.Show()
DEFINE CLASS myForm as FORM
	ADD OBJECT  lab AS label WITH left=50,top=10,Caption='='
	
	ADD OBJECT cmd as commandbutton WITH top=40
	
	 PROCEDURE cmd.Click
	 	thisform.lab.Caption='='
ENDDEF
Start is Ok
Click get Syntax error.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform