General information
Category:
Coding, syntax & commands
David,
Thanks for writing. That works. By passing the first object's "THIS" to the second, I can refer to the first object before its variable is created. However, in my situation, the results are inconsistent. Perhaps this is one of those "issues" to which you referred. Therefore, I'll just file this away for future reference.
Thanks!
Michael Reynolds
>Michael,
>
>By the time the Init() of an object fires it does exist and all of it's methods and properties are available to other objects. The problem is the memvar that holds the reference to this object has not yet been assigned. Does the other object need one of those methods to instantiate itself? If so you can pass THIS to the other object's Init method:
>
>* oLib.Init()
>
>public oOtherObject
>oOtherObject = createobject( "Other", this )
>
>There's a lot of other issues of object coupling here that you need to think about before committing too far.
>
>>I have a Custom Object containing library functions that I use as a common routine for all my applications. During its INIT routine, I want to load another Custom Object, that I can later refer to as a separate object. This second object requires routines contained in the calling (first) library.
>>
>>However, I cannot refer to the library ("oLib") as an object, because the object variable is not yet created. Is there another way to refer to the library object, or do I need to create the second object outside of the library?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only