1. David Peace (Powersoft)
  2. PowerBuilder
  3. Tuesday, 8 November 2022 11:17 AM UTC

HI Guys

Just had an odd thing not work in PB2022. I was training a new PB developer, we created a new SDI application from the template. We created a ne window w_base with company logo on and a DW control we modifiey the source of the generated Main windo to inherit from w_base changing both references to the from window. Something we have done many times before. Regenerated the window, tried a full build and the generated main window does not show the inderited objects from the base window.

Any ideas how I can force this to reevaluate?

Cheers

David

Accepted Answer
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Thursday, 10 November 2022 08:57 AM UTC
  2. PowerBuilder
  3. # Permalink

Just for clarification, this was my mistake. We had not edited the code correctly here i sthe resolution:

For the problem you are facing, you can solve it like this:
1. Modify using Edit Source, add call super:: code:
on w_dvptest_main.create
call super::create
if this.MenuName = "m_dvptest_main" then this.MenuID = create m_dvptest_main
end on

on w_dvptest_main.destroy
call super::destroy
if IsValid(MenuID) then destroy(MenuID)
end on

2. Or in IDE Painter, make any change to the w_dvptest_main window and save it. It will work the next time you open it.

If you run into any similar problems in the future, please inherit windows in the normal way using PB IDE, and then compare them to see the difference in source code.
Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 8 November 2022 16:07 PM UTC
  2. PowerBuilder
  3. # 1

As a workaround and answer to David's question "Any ideas how I can force this to reevaluate?":

  1. Open the main window
  2. paste any dummy control
  3. Save the main window
  4. close the window
  5. re-open the window
  6. delete the dummy control
  7. save the window

regards

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 8 November 2022 17:16 PM UTC
Or as my trainee did, delee the window and recreate in inherited from w_base LOL!
  1. Helpful 1
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 8 November 2022 16:04 PM UTC
  2. PowerBuilder
  3. # 2

Here's some more information:

Same thing happens in 2019 R3:

  • I have a button on w_base.
  • After editing the source code of the main window to inherit the main window from w_base. The button of w_base is not listed in the control list nor is it visible on the main window.
  • However, in the main window, when  going to the open event and starting to type "cb_...." the autoscript does seem to know the button, as it's being listed !
  • When adding a new button to the main window. (so far, there was nothing on this window), saving and re-opening the main window, now suddenly the button from w_base is also visible.

Very likely the same thing happens in PB2017 too.

David, you made the bug private, so I cannot add any of this information to your ticket.

regards.

MiguelL

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 8 November 2022 17:14 PM UTC
Chris has picked the bug up and reproduced it..... It's gove to development.



Thanks
  1. Helpful 1
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 8 November 2022 13:04 PM UTC
  2. PowerBuilder
  3. # 3

Hi David;

  Have you tried using the PB IDE object browser. Then regenerating all the Windows from the top level ancestor?

  Also, try optimizing your PBL(s) as well beforehand.

HTH

Regards ... Chris 

Comment
  1. Miguel Leeuwe
  2. Tuesday, 8 November 2022 16:20 PM UTC
Hi Chris,

I think that any change done on the "concrete" (David's "main" window) will make it work, as you can read in my reply. I pasted a dummy button, but maybe any change done to the window and saving it will solve the problem.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 8 November 2022 16:53 PM UTC
Hi Miguel!

It's a workaround for sure but, not a solution IMHO - as people without our type of PB prowess would be "out in left field" when this happens :-(

As for me with my STD Framework and people using the PFC framework, I would not be comfortable comfortable with this IDE behaviour.

Just my $0,.02

Regards ... Chris.
  1. Helpful 1
  1. Miguel Leeuwe
  2. Tuesday, 8 November 2022 17:00 PM UTC
I absolutely agree!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 8 November 2022 12:13 PM UTC
  2. PowerBuilder
  3. # 4

Hi David,

Sounds like a bug to me ...

Are the 2 windows of the same type? (Response, main, etc)

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 8 November 2022 13:04 PM UTC
I agree, but thought I would float it here first....
  1. Helpful
  1. Arnd Schmidt
  2. Tuesday, 8 November 2022 13:10 PM UTC
PB 2021 is also a bit.... confused :-(
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 8 November 2022 15:43 PM UTC
The same thing can be reproduced in PB 2019 R3 !

  1. Helpful 2
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.