1. Tobias Roth
  2. PowerBuilder
  3. Tuesday, 2 February 2021 13:46 PM UTC

Hi,

currently we are migrating to PB 2019R3.

After migration the statbar is not displayed. Has someone ever noticed the same problem?

PB2019 R2

PB2019 R3

After migration w_statusbar and w_toolbar is not displayed.

The testcase is a migrated workspace created by Roland Smith. Special thanks to him for the great code examples :)

https://www.topwizprogramming.com/freecode_statbar.html

I attached a PB2019R2 workspace.

Thanks & Regards,

Tobi

Attachments (1)
Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 2 February 2021 14:07 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Tobias,

I guess it is because the window classnames have changed in R3.

So you have to change the seeting for is_classname variable in the open events for w_statusbar and w_toolbar to "FNHELP" and "FNFIXEDBAR" (do not append "190"!)

See a similar post here: https://community.appeon.com/index.php/qna/q-a/update-your-pfc-platform-object

HTH,

René

 

 

Comment
  1. Roland Smith
  2. Friday, 5 February 2021 03:25 AM UTC
That is the correct fix I haven't had a chance to check all the examples with 2019-R3. Most of them come as 10.5/12.6 and it is up to the user to migrate.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 5 February 2021 16:11 PM UTC
Hi Roland, Might be good idea to explain this on your website for all your PB 10.5 code samples. I think lots of people going to make wrong assumption that PB is 100% backwards compatible and then erroneously conclude it is either your bug or Appeon product bug.
  1. Helpful
  1. Roland Smith
  2. Friday, 5 February 2021 19:16 PM UTC
I updated the text of all downloads. I also updated the code in Statbar to work correctly.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 2 February 2021 14:28 PM UTC
  2. PowerBuilder
  3. # 1

Well, the control is there, but its positions aren't being set correctly it seems to me:

Just right click on the toolbar and choose 'left', then you'll see the control at the bottom on the left:

 

Also the little application has to be adapted to PB2017 and PB2019, where there's checks on PBMayorRevision.

regards,

Comment
  1. Miguel Leeuwe
  2. Friday, 5 February 2021 01:41 AM UTC
Okay that's different. See my latest answer. on this page here.
  1. Helpful
  1. Dean Helsley
  2. Friday, 5 February 2021 15:15 PM UTC
Thanks, but that didn't fix it for me. I had to add this line in the frame open event instead. Because the window wasn't open yet, pfc_show doesn't execute of_refreshposition. This line is normally executed from the pfc_postopen event of pfc_w_frame).



inv_statusbar.of_Open(True)



That fixed it for me.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 5 February 2021 15:48 PM UTC
Hi Dean, maybe our pfc versions are different, or maybe you didn't initialize the bar in the pfc_preopen(), maybe you launched the of_show() not in the PFC_open() but instead Open() event?

It doesn't matter, as long as it works!

Anyway, there's a fix on the support site, so if you use that one, you probably don't have to add anything:

https://www.appeon.com/standardsupport/search/view?id=6011

regards
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 03:16 AM UTC
  2. PowerBuilder
  3. # 2

If anyone needs a working version of this for PB2019 R3 (or later), see the attached zip file.

regards

Attachments (1)
Comment
  1. Armeen Mazda @Appeon
  2. Friday, 5 February 2021 00:46 AM UTC
Thanks for sharing!
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 5 February 2021 00:49 AM UTC
Yw, Roland already fixed it too on his web, so that one can be download also.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 5 February 2021 01:50 AM UTC
  2. PowerBuilder
  3. # 3

Hi Dean Helsley,

I've been able to indeed reproduce what's happening with the PFC w_statusbar.
This window is of type 'child' and there's a bug of 2019 R3 opening all response windows centered. I wonder if maybe the same thing is happening with 'child' windows... (will investigate later on).

I have this code in the pfc_preopen() event of my frame window:

this.of_SetStatusBar(TRUE)
if IsValid(inv_statusbar) then
	this.inv_statusbar.of_SetMem(TRUE)
	this.inv_statusbar.of_SetTimer(TRUE)
	this.inv_statusbar.of_SetTimerFormat("dd/mm/yyyy hh:mm")
end if

To solve the problem, what I've done, is put the following line in the pfc_open() event of the frame window:

// the pfc_show will call the iw_statusbar.of_RefreshPosition()
if IsValid(inv_statusbar) then
	this.inv_statusbar.event pfc_show()
end if

It seems to do the trick!

regards,

MiguelL

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.