Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I add an OBJECT(not class) to a form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Can I add an OBJECT(not class) to a form
Divers
Thread ID:
00705999
Message ID:
00705999
Vues:
46
Hello. I have a generic dialog that I would like to be able to pass a more customized Container object into for any custom controls the client code requires(a certain area of the form is dedicated for this). The container object is created by the client code, as it may want to customize the properties at run-time based on the current context. Is there any way to add an instantiated object to the form when I run it? AddObject() and NewObject() both create objects from a class, so they won't work...

Something like this:

CLIENT CODE:
LOCAL oCustomContainer
oCustomContainer = CREATEOBJECT("custom.container")
oCustomContainer.txtTextbox.Value = "my custom text"

DO FORM myForm with oCustomContainer
Form's Init event:
LPARAMETERS toContainer

This.AddInstantiatedObject("FormName", toContainer)
I'll probably end up just having to not let the client code customize the container before it's run(have it pass in a classname instead of an object), but I'm seeking the community's wisdom before giving up. Thanks.
Derek J. Kalweit
Software Engineer
Microworks POS Solutions, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform