Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I add an OBJECT(not class) to a form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00705999
Message ID:
00706024
Views:
15
Another way would be to save as a class clients modifications (you can programmatically save as a class)...

>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.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform