1. Yuri Denshchik
  2. PowerBuilder
  3. Thursday, 20 June 2019 22:07 PM UTC

I need to find the ancestor name of Window.control[x]. The control is added to the window by using OpenWithParm() 

Please advice

Thank you,

Yuri

Michael Kramer Accepted Answer Pending Moderation
  1. Thursday, 20 June 2019 23:27 PM UTC
  2. PowerBuilder
  3. # 1

Hi Yuri,

The metadata of PB objects is found using the ClassDefinition.

 

Any class in PB is a descendant of PowerObject so every object has a property = ClassDefinition.

Now, ClassDefinition itself has two very important properties in this scenario:

  • string Name ==> Class Name of this class -- (equal to ClassName( ) for currently instantiated class)
  • ClassDefinition Ancestor ==> Ancestor class -- hence, this is where inheritance is defined

Class definitions is a whole advanced topic of its own. The best way to get started in my point of view is to put a breakpoint anywhere in any script of your control.

As soon as debugger hits the breakpoint, start inspecting current object, its ClassDefinition, and everything relevant that the ClassDefinition refers to.

 

HTH /Michael

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.