Ed,
That was my original idea, I was just wondering if there was a way that didn't expose as much of my form workings to the iterator.
Thanks
Rex
>>All,
>>
>>I need to return values from a visitor object to my form, but I want to maintain loose coupling between to objects. Is there a slick way to accomplish this? I am considering form properties, but that promotes tight coupling.
>
>What about passing a ref to the parent as a parameter, and then manipulating the properties of the parent object from the passed parameter? IOW:
>
>loMyChild = CREATEOBJ('ChildObj',this)
>
>or
>
>DO FORM MyChildForm WITH this
>
>and then create a property in the child object to hold the object ref, and assign it in the child's Init() method. Assuming you've defined a property ioParentRef in the child, add this to the Init method code:
>
>
>LPARAMETER toParentObject
>IF TYPE('toParentObject') = 'O'
> this.ioParentRef = toParentObject
>ELSE
> RETURN .F.
>ENDIF
>
>
>You can then access Public properties and methods of the parent within the child via this.ioParentRef. Just remember to release the reference this.ioParentRef in your Release() or Destroy() method of the child.
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