Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add object to form in code
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01561681
Message ID:
01561687
Views:
42
>>>Not quite sure how to do this.............
>>>
>>>I have a class (oJob) which is found in a prg (progs\job_generator.prg)
>>>
>>>I have a form. In the init of the form I want to add an instance of oJob as an object, not a property. The reason for this is that I would like oJob to be able reference properties on the form (this.parent.property)
>>>
>>>This isn't a critical issue for me (I have alternatives available that I'm sure would work) but I would like to know if this can be done and, if so, how.
>>>
>>>Thanks to all...............Rich
>>
>>Check the ADDOBJECT() command in the help - it's not too difficult to follow.
>
>Thanks for the response. For whatever reason I was having problems getting the parameters correct with AddObject() and wound up going with NewObject().

Cool. One thing I thing you might have to do is the SET PROCEDURE TO and/or SET CLASSLIB TO (and there is pretty important ADDITIVE thing at the end of those statements you can use). Sound like you already got it all figured out so just an FYI... :)
ICQ 10556 (ya), 254117
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform