Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wierd Behaviour with SET CLASSLIB
Message
De
01/04/2016 15:06:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Wierd Behaviour with SET CLASSLIB
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01634169
Message ID:
01634169
Vues:
61
Hi all,

Ran across this bug in some 3rd party VFP code. When users were logging into their RDC server and are running a report that first opens an "options" form, they were getting error messages upon every instantiation of a text box. It was hard to get at the error as the code is a 3rd party report writer that takes control of error handling.

But I finally tracked it down to error in this code:
IF NOT '\XXFw.vcx' $ SET('ClassLib')
   SET CLASSLIB TO XXfw.VCX ADDITIVE
ENDIF
Since the left side of the IF statement is in mixed case and the right returns uppercase, the SET CLASSLIB TO was firing on every textbox.

This raises an error when the form is run on the RDC server but not from users within their office. The error was #24 "Alias is already in use".

I also could not reproduce it from my dev machine.

It seems that if you reissue a SET CLASSLIB that there generally is no error - but somehow on RDC there is.

I fixed the code but just was wondering if anyone knew why the behaviour. Is there some setting that affects what happens if SET CLASSLIB is set to an already open class?

More curious than anything.

Albert
Répondre
Fil
Voir

Click here to load this message in the networking platform