Identify and call back to "parent" object.

Discussions related to Visual Prolog
daveplummermd
VIP Member
Posts: 87
Joined: 18 Jul 2006 17:18

Identify and call back to "parent" object.

Unread post by daveplummermd » 2 Jan 2019 6:25

Guys
Is it possible to identify the calling object and callback back to it from a created object?

Example:
1) From within Taskwindow create object O1 that belongs to class C1.
2) From within Taskwindow create object O2 that belongs to different class C2
now...
3) Both O1 and O2 each create objects O3 and O4, both belonging to the same 3rd class, C3.

I am trying to callback from O3 and O4 to the correct "parent" object, but iI need to identify that parent as either O1 or O2.

I have a cumbersome method using expanded new() and display() that requires additional argument passing, but I suspect there is a more elegant, direct method.

Thanks in advance

Dave
Dave Plummer

User avatar
Thomas Linder Puls
VIP Member
Posts: 2407
Joined: 28 Feb 2000 0:01

Re: Identify and call back to "parent" object.

Unread post by Thomas Linder Puls » 2 Jan 2019 12:47

I think it sounds like a good way to do it.
Regards Thomas Linder Puls
PDC

Post Reply