Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

back button android error insert group object
Started by andrea_corte Apr 27 2018 02:21 PM

- - - - -
2 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

andrea_corte

[GLOBAL: userInfoPane.html]
andrea_corte
  • Observer

  • 26 posts
  • Corona SDK

Good evening

I have a probema that I can not solve.
I have a scene with timers that download images via network request, these images once downloaded are inserted into the group.
 
The problem is created if as soon as I open the scene I immediately press the back button of android that takes me to the scene before.
 
I enclose the photo of the error.
 
There is a lot of documentation on this error but unfortunately I am not very experienced and I could not solve it.
 
Can someone help me and explain how I can solve? I do not want to abandon the back button of android
 
Thank you all
 
Best regards

Attached Files



[TOPIC: post.html]
#2

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,723 posts
  • Corona SDK

You must check your scene is valid before trying to use elements of the scene as user could of backed out before your network requests have completed.



[TOPIC: post.html]
#3

andrea_corte

[GLOBAL: userInfoPane.html]
andrea_corte
  • Observer

  • 26 posts
  • Corona SDK

Thanks for the reply
How can I verify that the scene is valid? I have an native indicator that starts at the beginning of the scene and goes off when the scene has loaded everything.
the problem is that if before the start of the native indicator I go back with the back button it gives me that error.
I have to insert a timer that for 2/3 seconds I do not use the back button of android?
is not there a way to get back to the previous scene without having loaded the current scene and without receiving an error? I have seen that the problem exists only if I insert the objects in the group and in the scene before I remove the scene
Thanks so much
best regards



[topic_controls]
[/topic_controls]