46
Views
4
Comments
Solved
[OutSystems UI] ApplicationLoadEvents - OnDestroy
outsystems-ui
Reactive icon
Forge asset by OutSystems

The ApplicationLoadEvents Webblock in Outsystems UI should have an OnDestroy Event in case the block is still running before the screen is destroyed.

Same issue is referred on this thread: https://www.outsystems.com/forums/discussion/67944/error-in-applicationloadevents-onupgradeprogress-onloadcomplete/

2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hello @André Pinho 

Thank you for sharing that sample, and with that, we could reproduce the issue.
At the moment, I can't provide any quick workaround, but we've created a task to tackle this in a future release of OutSystems UI. For future reference, in the release notes, the task code is ROU-12348.

Edit: 

@André Pinho I created a clone to test some changes. Could you please validate your use case and test a couple more (I have 3 different scenarios in the app) so we can move forward with a similar approach?
Find the oml attached 🫡

Cheers,
GM

PushNotificationTest_Reviewed.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi André,

That block actually contains an OnDestroy event to clear a timeout and an interval. 
Could you please elaborate a bit more on the use case and how to replicate it?

Also, when opening this new post, what was your goal, given the same being mentioned in the post you mentioned? Seems like a duplicate post, but correct me if I'm wrong.

Best Regards,
GM

2018-08-04 18-19-00
André Pinho

Hey Goncalo, 

Yeah some people dont like when we revive old posts, so posted a new one. I get this error in SC:
Invalid call of the 'TriggerOnLoadComplete' client action of the 'B_Common.Splash' since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action.

I dont wait for the finish callback, the user is moved to the relevant screen after a get from local storage. So I think the TriggerOnLoadComplete is still being triggered even thought there is an ondestroy event. 

OML attached.

Hope this helps.

ApplicationLoadEvent.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hello @André Pinho 

Thank you for sharing that sample, and with that, we could reproduce the issue.
At the moment, I can't provide any quick workaround, but we've created a task to tackle this in a future release of OutSystems UI. For future reference, in the release notes, the task code is ROU-12348.

Edit: 

@André Pinho I created a clone to test some changes. Could you please validate your use case and test a couple more (I have 3 different scenarios in the app) so we can move forward with a similar approach?
Find the oml attached 🫡

Cheers,
GM

PushNotificationTest_Reviewed.oml
2018-08-04 18-19-00
André Pinho

None of the 3 Splash screen scenarios in the OML had issues. I also tested the new ApplicationLoadEvents_Revisited WB on my scenario and it worked without any issues.

Thanks for looking into this so fast.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.