Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code Adds Wrong Class
Message
De
13/02/2008 11:24:46
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01291993
Message ID:
01292201
Vues:
21
>I have a section of code that adds a button to a form. The problem is that there are
>multiple command buttons with the same name in various class libraries all over the application.
>
>The name of the class and the VCX it's in are stored on the form as properties:
>
>
>cLibrary = GETWORDNUM(ThisForm.button, 2, ',')
>cClass = GETWORDNUM(ThisForm.button, 1, ',')
>
>SET CLASSLIB TO (cLibrary) ADDITIVE
>
>ThisForm.AddObject(cClass, cLibrary)
>
>
>The problem is that because there are many copies of this button with the same name,
>just in different VCS's, the wrong class is added.
>
>Anyone know how to fix this?

Actually this explains one of the reasons for X8SETCLS in VMP. :)

Further if you have a single uniquely-named classes (and UDFs) you could not possibly have the situation you describe. Using PRGs with multiple UDFs allows for two UDFs to have the same name in different PRGs. Same thing with classes.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform