How do we manage multiple virtual screens without getting confused?

Yes

mmm, it is working right for me...have you changed anything? share your current aia

ShopingLista_checkpoint1.aia (61.8 KB)

It works fine...the problem is that you are not deleting what you are storing in tinyDB...maybe, when clicking in "Make a new list" you need to "clean" all the tags stored in TinyDB..

You must regard the TinyDB contents as the source of truth, and don't rely on globals so much.

From Screen1:

Wrong:


Right:


Even better would have been to use local variables for this.

Better:


(Also corrected missing tag/value default to Create Empty list)

Screen3 could be simplified with the proper list blocks:

Old:

New:

If the delete button is accidentally pressed, this message appears

After the purchase of some products once and I close the application and open it again, on the first screen if I press the Button The shopping list. it only shows the black screen without saving the items that have not been purchased

Clicking buy brings up all the products together, the ones that were bought and not deleted and the ones that weren't bought

And with the press of finished shopping it takes out this

Pressing the back button also does not close the application

ShopingLista_checkpoint1.aia (61.8 KB)

A confusing list, I still haven't managed to fix it

When I press the back button, it doesn't close, it wants to make me keep buying the same things over and over again :smile:
In the end it will leave me penniless

Have you tried this?

We have talked about this in the past....if you open the app and then press back, it closes with no problems...the problem is when you go forward and backwards through the screens...and the several instances are opened...you need to close a screen when opening a new one.

You have two problems here...to protect the procedure when the list is empty and to avoid to remove the first item of the list when no item is selected and you click the Delete button. You can add following blocks:

If you have not deleted tinyDB it will stay there eve if you close the app and reopen...maybe you have recompiled/reinstalled the app? in that case the tinyDB has been "overwritten"


Screenshot_2
Screenshot_3
These are what I put on the 3 monitors but it won't close, it plays back and forth with the monitors

I was referring to the buttons used to open new screens....If you open a new screen every time you change the screen, no closing the before one...you will have several instances...

Is there a comprehensive guide that describes how I manage such problems?

Of course, in this immense community there is everything:

But, please, don't implement the checkbox part....You can assume that checkbox is already checked. Don't store anything new relative to this in tinyDB...this is the key part to always keep only one screen opened:

image
.

You can use the examples of the link to "play" with it and to understand how it works...the difference between close o not close the current screen when opening a new one.

Here when I press the button, make a new list , it takes me to the first screen. And if I use the back button from there, the application does not close immediately, even though I managed to close it without pressing this button.

Also something else I find wrong with this list.
It does not delete the checked purchased products so that only the ones that were not purchased remain.
Delete purchased products completely and keep only those that were not purchased, to complete the list for a subsequent purchase, only with those left out of the market
ShopingLista_checkpoint1.aia (62.8 KB)

Well, it is so difficult if you change the blocks without understand what are you doing...we are repeating the same errors once and again...I told you that didn't store anything new in tinyDB, nor checkboxes news....Regarding to keep the pending products...it is not an error...it is not implemented...I share you a modified aia, with the correct buttons to switch screens and to close the Screen1 i back pressed.

It also has the moficication to keep the pending products in the list. Check it.

ShopingLista_checkpoint1_MODIF.aia (62.6 KB)

Your code is too gullible.

It foolishly does things without checking first for problems.

1 Like

Man, just use Dynamic Pager and Dynamic Components.