Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddProperty behaviour change!
Message
De
07/01/2002 12:43:22
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
AddProperty behaviour change!
Divers
Thread ID:
00601558
Message ID:
00601558
Vues:
63
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!

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform