Search code examples
inheritancepowerbuilder

Powerbuilder randomly checking and unchecking Extend Ancestor Script


Hierarchy,for context:

window
‎‎
‎‎v

w_base

‎‎v

w_mywin1 -has-> wf_func()
‎‎
‎‎v

w_mywin2 -> wf_func()

  • wf_func() Being a object function
  • w_base Being a window
  • EAS Being Extend Ancestor Script

When I add code to wf_func in the inherited window EAS is enabled and checked, but when I test it, the ancestor doesn't run, I check wf_func() again and EAS is unchecked and disabled.

I have disabled EAS on a CommandButton in the window, when I enable it and go to wf_func() EAS is enabled. This is not consistent. Am I doing something wrong that causes PB(19 R3) to freak out?

I know and have fixed it with a super:: call, at first, but the window seems to have other inheritance problems.


Solution

  • Functions are not extended from the ancestor, events are. If you modify a descendent function then only the code there will execute unless you explicitly call the ancestor function.