1. Sofhin Wong
  2. PowerBuilder
  3. Tuesday, 28 February 2023 07:08 AM UTC

Anyone knows what cause this error?

 

I added a command button in my ancestor object. I then regenerate the ancestor object together with my descendant object.

 

I am able to regenerate these two objects, however, when I open my descendant object, it prompts the error message 

 

Application terminated.

Error: Bad runtime function reference at line 2 in create event of object tabpage_header of object_name

 

 

The thing is create event of object tabpage_header isn't defined by me. It is automatically there when I add control to the object.

 

Any idea?

 

Any inputs are highly appreciated.

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 28 February 2023 13:25 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Sofhin;

   For changes like this, I use the PB IDE's Object Browser. Once in there, display the object category (ie: Window), turn on display ancestry hierarchy, & then expand all. From the top ancestor, RMB & then select regenerate. This will walk the ancestor / descendant heirarchy and rebuild the objects in the appropriate order. Regenerating from the Target object just regenerates the objects in no particular order. Sometimes rebuilding a descendant before it's ancestor. Hence, leading to your predicament.  HTH 

Regards... Chris 

Comment
There are no comments made yet.
Sofhin Wong Accepted Answer Pending Moderation
  1. Wednesday, 1 March 2023 09:10 AM UTC
  2. PowerBuilder
  3. # 1

Hi, all.

 

Thanks for the replies and guidance.

 

I managed to solve this issue by getting all ancestor objects and regenerate it.

 

I hit this error because I only regenerate one of its ancestor and descendant object.

 

 

Appreciate!

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 1 March 2023 15:34 PM UTC
Hi Sofhin;

That's awesome news! ;-)

Regards... Chris

  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 2 March 2023 16:00 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 28 February 2023 11:36 AM UTC
  2. PowerBuilder
  3. # 2

HI,

Sometimes PB spontaneously adds the events create() and destroy() to show up in your events list, which should never happen, but it does.

Maybe you can fix it by editing the source code and deleting the "event create" and "event destroy" stuff?

regards.

Make sure to have copies first !!!

Comment
  1. Miguel Leeuwe
  2. Tuesday, 28 February 2023 11:37 AM UTC
can you add the exported source code? (you'll have to put it in a zip file before you can attach it).
  1. Helpful
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.