Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AddProperty behaviour change!
Message
From
07/01/2002 12:43:22
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
AddProperty behaviour change!
Miscellaneous
Thread ID:
00601558
Message ID:
00601558
Views:
68
I have encountered this while upgrading some of our classes to VFP7.

In VFP6 SP5 the following code will work:
Test = NewObject('Custom')
Test.AddProperty('Exec(1)','test')
Test.AddProperty('Addb(1)','test')
In VFP7 the above code would not! - will produce Incorrect property name. error.



Possible reason
Exec -> ExecScript() function
Addb -> AddBS() function
and somehow VFp7 decides that this property names are actually functions.
have tested this using square brackets - the same result (Incorrect property name.)



Note that the following code works in either VFP6 and VFP7:
Test = NewObject('Custom')
Test.AddProperty('Exec','test')
Test.AddProperty('Addb','test')


So... Just to yell...
why should I search and replace every such occuarance in about 10000 lines of code (some of it is generated by contents of tables)?

Note that actually the problem is with the Exec property (the Addb property is shown here just for example)

And moreover Exec is not a reserved word in VFP6


Keep on smiling... Tomorrow it will be worse!
Murphy Laws
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Next
Reply
Map
View

Click here to load this message in the networking platform