1. Tracy Lamb
  2. PowerBuilder
  3. Wednesday, 25 May 2022 16:30 PM UTC

Hi all,

I have a tab object inherited from u_tab: utab_folder.  Another tab object inherited from utab_folder: utab_lab.  In utab_folder I defined an instance variable u_tab itab_This, and in the constructor event of utab_folder I set the itab_This variable: itab_This = this.

In utab_folder, in the constructor event, I reset the itab_This variable: itab_This = this.  From this point, I should be able to reference all events and functions defined in utab_folder.

In several u_dw objects on several tab pages I need to call a function on itab_This... of_get_status(adw_form).  From the udw object I call itab_this.of_get_status(this).  Keep getting an error: Unknown function name of_get_status

of_get_status is definitely defined on utab_lab.  I don't understand why this function isn't recognized. 




Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 25 May 2022 16:46 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Tracy;

  Remember that your dealing with two parent objects overtop of the DW control. The immediate parent of the DC is the Tab Page & the parent of the TP is the Tab Control. You could even have more parents to the DC if the TP has a User Object inside of it, and then the DC within that UO then adds another level of parentage.

   So the key to your problem might be either parentage or capturing the THIS pointer before the TC/TP is properly instantiated.

  Also be aware that TP instantiation can be delayed if the "CreateOnDemand" property is set to True.


Regards ... Chris

  1. Tracy Lamb
  2. Wednesday, 25 May 2022 17:30 PM UTC
Thank you Chris,

I defined a new instance variable: utab_lab itab_lab

In the constructor event of utab_lab, I added utab_lab = this

In the u_dw event I change the code: li_Status =utab_lab.of_get_status(this)

This works. I could also find the parents of the u_dw, that works too, but I have to reuse this logic in 10 u_dw's... so easier to just set it up front.

Many thanks,


  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 25 May 2022 17:45 PM UTC
That is awesome news Tracy! :-)
  1. Helpful
There are no comments made yet.

There are replies in this question but you are not allowed to view the replies from this question.