4.2k views
in GUI Development by

Could someone provide further explanation of an error 308 "postsignal is failed. The signal is just delivered". I get this when the follow method{} code is launched after a native() block:

method void finishScan()
{
pure WIFI_scanRunning = false;
notifyobservers ^WIFI_scanRunning;
}

[edit] This method causes an Observer to run a PresentDialog() and its this call that causes the 308 error ... ???

1 Answer

0 votes
by
 
Best answer

Hello Mike,

this error indicates, that your application is trying to post again a signal which is actually in processing. In other words, the method finishScan while being executed in context of some signal X is trying to post again this signal X. The affected signal X, I assume, will be sent by notifyobservers. Doing this could lead to endless signal delivery - the application would hang. Therefore the signal is ignored. The error message should just warn to review your application.

Please see also the end of the chapter postsignal.

Best regards

Paul Banach

by
I see. I narrowed it down to something within my PresentDialog(). The called Dialog is comprised of a VerticalList. And a OnLoadItem slot{} for populating it. Within this slot{} I have the following line:

//VerticalList.NoOfItems = Device.WIFI_Scan_Count;     // this causes some error in the EmWiz debugger

Even if I do VerticalList.NoOfItems = 5; I get the 308. This line was (not at the moment) causing a bug warning in Studio as well. Why cant I touch VerticalList.NoOfItems in my OnLoadItem slot{}?! Is it because this slot{} is iteratted a bunch of times over and over?

 

[edit] I tried the following to just hit that line once, but that didnt work. Still get a 308
if(itemNo == 1)
  VerticalList.NoOfItems = Device.WIFI_Scan_Count;
by
Oh, here we go.. It's spitting out Debug info again:

[28.8.2019 11:08:14] Information : Prototype the class 'Application::WIFIscanDialog' ...
[28.8.2019 11:08:14] Runtime Core::Group.InvalidateViewState (2:1) : Could not post again the signal '@09FFF6A0.VerticalList.updateComponent'. This signal is currently in progress. The operation was ignored to avoid endless signal delivery. The current callstack is shown in the log messages below.
[28.8.2019 11:08:14] Runtime Core::Group.InvalidateViewState (2:1) : Callstack backtrace level #0
@09FFF6A0.VerticalList.InvalidateViewState()
[28.8.2019 11:08:14] Runtime Core::VerticalList.OnSetNoOfItems (40:1) : Callstack backtrace level #1
@09FFF6A0.VerticalList.OnSetNoOfItems( 0 )
var rect area = <0,0,500,1280>
[28.8.2019 11:08:14] Runtime Application::WIFIscanDialog.OnLoadItem (17:3) : Callstack backtrace level #2
@09FFF6A0.OnLoadItem( @09FFF6A0.VerticalList )
var int32 itemNo = 1
var Application::WIFIscanDialogItem itemView = @09FFFD74
[28.8.2019 11:08:14] Runtime Core::VerticalList.confirmTailItem (31:1) : Callstack backtrace level #3
@09FFF6A0.VerticalList.confirmTailItem()
var Core::View item = @09FFFD74
var int32 validTailN = 1
[28.8.2019 11:08:14] Runtime Core::VerticalList.UpdateViewState (118:28) : Callstack backtrace level #4
@09FFF6A0.VerticalList.UpdateViewState( [AlphaBlended,Enabled,Focusable,Focused,Selected,Touchable,Visible] )
var int32 cache2 = 2
var int32 cache3 = 1
var int32 count = 5
var int32 head = 0
var int32 loadHead = 0
var int32 loadTail = -1
var int32 paddingTop = 0
var int32 reuseHead = 0
var int32 reuseTail = -1
var int32 tail = 6
[28.8.2019 11:08:14] Runtime Core::Group.updateComponent (13:3) : Callstack backtrace level #5
@09FFF6A0.VerticalList.updateComponent( @09FFF6A0.VerticalList )
var bool updateLayout = true
by

Hello Mike,

trying to modify NoOfItems property of a Vertical List while this is loading the items via OnLoadItem will disturb the loading process. Please don't modify the properties of the Vertical List in context of the OnLoadItem method. Limit to load the requested item only.

Best regards

Paul Banach

by
Thanks Paul, But where is the best place to dynamically update the NoOfItems? Can I update this in init{} ?

/ms
by
Hello Mike,

you update this value always when the amount of data you intend to display in the Vertical List changes. If the value is static, you can specify it directly in Inspector window. If the value is determined just in the moment when you show some GUI component, you can do this in the Init method of this component. If the value changes due to some external events, you will need to react to the events and modify the value accordingly. In fact, it depends on the application case.

Best regards

Paul Banach
by
I used Init{} that seems to work without error. Thanks again Paul

/ms

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...