Hello Nadya,
Yes, Event objects will do what you're looking for, as Paul suggested. Our rule of thumb is that once we have more than 2 objects collaborating, we move the code to an event object.
Since this is a more abstracted layer, the event should be the only object that "knows" how to coordinate already existing methods provided by the participating entities. This makes for loose coupling... one of the "best" OOP practices. In this case, you would have a method in the Event object that would call somemethod() on the Calendar object.
Also, check out GetBizObject() in kBizObj. It has the means for preventing circular references should you decide that it makes more sense to have the secondary objects instantiated by the primary one.
Hope that helps,
---J
>Hi everybody,
>
>For batch process which is going to be run at night I'm instantiating a biz obj in the program. I found, that I need to use some logic from another biz object. I may want to use more biz objects.
>
>So my question is how to approach this the best way:
>
>1. Put all biz objects into container and then I want to use some methods or properties from other object in the first object use:
>
>
>this.parent.CalendarObject.somemethod()
>
>
>2. Create an object reference in my main object. In its PostInitHook do something like
>
>this.NewObject('CalObj',"CalendarObject")
>
>
>What is the preferable method?
>
>Thanks a lot in advance.