Inconsistent behaviour

Hi Thunkers,

Just a quick general question that is really annoying me!
I’m working on app that requires storing data into a variable on one screen and retrieving the result on a different screen.
Has anyone else found that data is sometime inconsistent? Or that just in general their app works, but behaves as expected sometimes and on other occasions doesn’t??

In general this strange result is seriously hindering both the development time and debugging efforts!!
At this point I’d be curious to hear other Thunkers experiences or is it just me and my crappy thunking?

2 Likes

I have variables that keeps data between screens all the time but never encountered an inconsistency in how it works.

I noticed with navigators the behaviour change but even in this case it is consistent.

2 Likes

I normally don’t have issues. Could you share your code? What type of variable are you storing - cloud, stored, app?

2 Likes

I wonder if this is an asynchronous problem? Some blocks (especially purple blocks!) run asynchronously, so the code may continue on to the next block before one of them finishes doing what you expect it to do (i.e. setting a variable). Subtle differences in timing have been a source of inconsistency for me.

2 Likes

Thanks all!
@catsarisky I think that’s it, timing! I’ve popped in some waits at key points and that’s has improved consistency!!! Any recommendations or best practices for using waits? e.g. Like around “purple blocks” and or durations?

Cheers!

1 Like

Search the forums for asynchronous - several recommendations in the top hits. :slight_smile:

1 Like

Cheers!

1 Like