Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UDF name conflicts with new function name
Message
De
20/10/2006 11:31:06
 
 
À
20/10/2006 11:19:38
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01163604
Message ID:
01163673
Vues:
9
>Hi Peter
>
>>Hi All,
>>
>>A colleague has since long a UDF named ISTR() that is used in many places. Since vfp9 there is a new function named ISTRANSACTABLE() that can also be shortened to ISTR(). The UDF is no longer found.
>>
>>Is there any way of dealing with this situation other that going through the tedious and dangerous process of searching and replacing all occurences of the UDF?
>
>That's so unfortunate. You could try a naming convention to reduce the chance of that, but let's say you used PVUDF. Microsoft could have added a PVUD function at any time. That's the problem with conventions, everybody in Microsoft and outside would have to follow them. Sure. Right. :)
>
>Better to do the search and replace. Only name it more descriptively. What does ISTR do now?

I'm not sure, but I presume it returns an integer as a string.

It indeed is a pity the way MS handles this. Several solutions come to mind.

First, we should have the oportunity to #include global #defines. Why do we have to specify the constants for each and every program, form and class?! Why not the possibility to (also) specify a single include file that is valid for all stuff in the project?!

Second, we might be given the opportunity to intercept the system function call and redirect to a UDF. Like what was done in Clipper. The use of ISTR() could then be redirected, while the use of a longer string ( e.g. ISTRA() ) could still lead to use of the sytem function. Suppose we are allowed to create a simple ISTR_ACCESS(), that might be the trigger for vfp to allow the user to intercept usages of ISTR().

Any way, we need the vfpteam in this. Could be a wish for vfp10 or whatever it is called.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform