1. Daniel Vivier
  2. PowerBuilder
  3. Thursday, 3 October 2019 20:06 PM UTC

We have a problem that two users are experiencing, but we cannot replicate. A window showing a date entry datawindow of transactions calls ScrollToRow(dw.RowCount()) to put the cursor on the last row. That always works for us (and we believe most users) but for two users, the 1st row is displayed instead of the last one. But if they press Tab, it moves to the 2nd field in the last row (scrolling to display it).

So that's why I say it's behaving as if only SetRow was called.

We have see a PBDEBUG output and only ScrollToRow is ever called, never SetRow.

Any bright ideas?

Ronnie Po Accepted Answer Pending Moderation
  1. Friday, 4 October 2019 16:46 PM UTC
  2. PowerBuilder
  3. # 1

Here's a dumb question: is there an expression on the Protect property of the column which would prevent that column on the last row from getting focus? I.e., is it possible that column A has focus in row 1 but cannot get focus on row N because of a Protect property expression?

 

Comment
  1. Daniel Vivier
  2. Friday, 4 October 2019 17:00 PM UTC
Thanks, Ronnie. I'm aware of that problem. As I mentioned in a previous answer, the last row is always completely empty (and thus with no columns protected) so that is not causing the problem. If that was the problem we would have the same issue on our computer when testing, but only a couple of users were having the problem.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 4 October 2019 02:15 AM UTC
  2. PowerBuilder
  3. # 2

Hi Dan,

 

"So that's why I say it's behaving as if only SetRow was called."

Can you test with enough data, so that V-scrollbar is being displayed?

Does it then show the slider of the vscrollbar all the way down?

 

And now the probably stupidest thing I've ever come up with:

I can't test it, as I don't have a scroll-lock key on my laptop. (tomorrow I will do that).

Does it make any difference when that key is activated? I know it affects browsers, not sure about PB.

Comment
  1. Miguel Leeuwe
  2. Friday, 4 October 2019 12:38 PM UTC
I'd say:

Have a look at what's done before the "Postevent("ue_post_open"). Maybe there's something which might "invalidate" the event being launched with post. Like maybe a SetFocus() or SelectTab()? (It shouldn't but just in case).

Do you have a tab control with "create on demand"? That might change event execution.

I seem to remember that there's differences in the open event execution when the window is opened maximised or not.

Also, see if anywhere the windows is being set to "invisible" or if there's a Hide(), setredraw() somewhere before the messagebox is launched.

HTH
  1. Helpful
  1. Daniel Vivier
  2. Friday, 4 October 2019 12:38 PM UTC
Darn. I cannot reproduce this with a simple example. Must involve something more complex in my code. So I guess I cannot report it as a bug. I will however search the bugs to see if anyone else reported anything similar.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 4 October 2019 12:40 PM UTC
Would it be solved by doing a POST on the messagebox() as a temporary workaround?
  1. Helpful
There are no comments made yet.
Daniel Vivier Accepted Answer Pending Moderation
  1. Thursday, 3 October 2019 20:38 PM UTC
  2. PowerBuilder
  3. # 3

Yes, I'm sure of those things Chris.

And we just observed something really weird. A messagebox in the window's ue_postopen event (posted from the Open event) was displayed before the window was displayed. I always thought as soon as you post out of the Open event, the window is displayed. Since the retrieve and ScrollToRow was being done in ue_postopen, if the window wasn't visible, I can imagine that could cause a problem.

So we just added Yield() before PostEvent("ue_postopen") at the end of the Open event. Now the messagebox appears over top of the window, rather than before it is displayed. I'm waiting for the user to test it with that change.

But why should that have been necessary? What am I misunderstanding about Open and posted ue_postopens?

Comment
  1. Chris Pollach @Appeon
  2. Friday, 4 October 2019 19:22 PM UTC
Hi Dan ... Yes, it may not be the solution in your case as the problem may not be object class hierarchy related. I use this feature all the time in my frameworks when I am refactoring either Base or Abstract ancestors. I just had to do this procedure last month when I released the PB2019 version of the Integrated framework. After migrating it from its PB2017R3 version and tweaking a few ancestors for PB2019 feature alignment - my OrderEntry Demo App would not work. But recompiling from the Menu, UO and Window ancestors from their "base " level down via the Object Browser did the trick. At least you now have another "trick" for your PB toolbox. ;-)
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 8 October 2019 20:36 PM UTC
Hi Chris, I found it very interesting when you said that a "The Full Build just does a build by object in PBL order"... Are you sure of that? I mean in the old days, yes, you'd have to regenerate everything as many times as inheritance levels you had to make sure everything would be correct. But then they improved that process, hence we could do 'incremental' builds which were never perfect, but at least did an effort to start to regenerate things by starting with the ancestors of the lowest level. Have I been foolishly wrong all these years?

regards
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 8 October 2019 23:23 PM UTC
Hi Miguel ... yes, I've had two support tickets this year where that technique sorted out the problem for the Appeon customer. ;-)

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 3 October 2019 20:11 PM UTC
  2. PowerBuilder
  3. # 4

Hi Dan;

1) Are you sure that those two users have the "same build" of your PB App?

2) Are you sure that those two users have the same PB run-time installed?

Regards ... Chris

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.