378 views
in GUI Development by

Hi,

with the last update to version 12 of EmbeddedWizard the behaviour of some functions in class Core::Outline changed. This leads to new error messages after migrating the project.

For example I use Outlines to have a srollable Item on the Screen. There is a Scrollbar which shows the current scroll state.
For updating the scrollbar I have a slot method updateScrollbar as follows:

VertScrollbar.ContentArea = Outline.GetContentArea( Core::ViewState[ Visible ] ).h;
VertScrollbar.ViewArea = Outline.Bounds.h;
VertScrollbar.Position = -Outline.ScrollOffset.y;

The OnUpdate slot of the outline is filled with that slot method.

In some screens there is the problem that Outline.GetContentArea( ) triggers layouting whereupon the OnUpdate slot is triggered a second time while it is processed.
EmbeddedWizard shows the following error message:

[14.4.2023 13:45:52] Runtime Core::Group.recalculateLayout (299:3) : Could not post again the signal '@0B2FD644.ActionScreenGrid.updateScrollbar'. This signal is currently in progress. The operation was ignored to avoid endless signal delivery. The current callstack is shown in the Log window area 'Debug'.

Is there a way to make sure that calling Outline.GetContentArea( ) will have to do a new Layout to avoid repeated triggering of the updateScrollbar?

Thanks
Dennis Nowak

2 Answers

0 votes
by

Hello Dennis,

thank you for the report. With version 12 we have in fact modified Outline's method GetContentArea() to trigger the update if something has changed in the past. I have to reproduce and analyze the situation. Possibly it is an error. As soon as I have understood the problem, I let you know about the possible workaround.

Best regards

Paul Banach

+1 vote
by

Hello Dennis,

I was able to reproduce the situation. The error can occur when the layout of the Outline Box is invalidated again just after the end of the preceding layout update and before the delivery of a signal to the OnUpdate slot method. The signal is posted at the end of the layout update and it is thus deferred. The mentioned invalidation of the Outline Box layout can be provoked when e.g. a new view is added to the Outline Box or an already existing view changes its size.

Since the situation depends on the timing behaviour of the application it is difficult to deduce the exact cause in your application case. In fact I had to try different tricks to provoke it. For the next version we will rework the Outline Box to explicitly postpone the OnUpdate signal when in the meantime the layout has been invalidated again. For the actual version I would suggest following workaround:

From your description I have understood that actually the Outline Box is connected via its property OnUpdate to a slot method updateScrollbars. Then:

1. Add a new slot method to the component. Name it e.g. preUpdateScrollbars.

2. Change the property OnUpdate of the Outline Box to refer the just added slot method preUpdateScrollbars.

3. Implement the new slot method with following code:

postsignal updateScrollbars;

The additional slot method causes the signal to be postponed through which the Outline Box will have enough time to complete the pending layout update.

Let me know whether the workaround does solve the issue.

Best regards

Paul Banach

by
Hi Paul,

thanks for providing this workaround. This solves the issue.

Best regards
Dennis Nowak

Embedded Wizard Website | Privacy Policy | Imprint

...