How do we manage multiple virtual screens without getting confused?

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.

Unfortunately, my knowledge about them is minimal. That's why there is this naivety of stock code, but mostly the not easy understanding of it all.
One thing is for sure, I'm trying.
And my last attempt at this whole multiple virtual screens thing. Add the list to the 3 remained virtual screens.
Thanks for the help.

Im newby to (active from a month with lucky) don´t worried or feel "attack".

It allows you to dynamically create the components for your application, like: Columns, Rows, Buttons, Labels, Etc.

There are a lot of tutorials on youtube

  • View Pager:

Allows you to create a Pager :rofl: but in a dynamic way

Link to AIX [Use version 2]

  • With these 2 things you can create whatever you want in your UI without restriction and dynamically.

Example, I am working on an application where these 2 components are essential, because I call absolutely all my UI from a database.

In my screen i only have a Row Layout as an AppBar, other Row Layout to View Pager and a Column Layout to handle the OnPageChanged event.

  • So... i call from my DB all the Options Titles that act as screens
  • Create the View Pager in Horizontal Arrangement
  • For each Title [News, Weather, Professionals, Appontments, etc] create a view on the view pager.
  • On the OnPageChanged event, im use the Vertical Arrangement to show al the sub options created with the Dynamic Components
  • And from there the rest of the logic of your App.

You can create a new window with another Pager and pass parameters to it, etc.

That way, directly from my database I manage the entire UI in realtime (Labels, Buttons, Images, icons, Spaces) and their respective parameters [Height, Width, Color, Padding, etc.]

  • It does not necessarily have to be a database, as it could well be a csv list, dictionary, list, etc.

  • The point is that to appreciate its true potential, it is better to do it from a cloud database.

The best of the vibes from :argentina: to the :world_map:

Thanks a lot for the suggestion, I'll have to look it up

1 Like

:muscle: :muscle: :muscle:

  • 1º Read all post to see all the issues and the way they solved or not, there's a lot info on how to use this components.
  • 2º Use youtube to see them in action.
  • 3º POST/PM if you need special help.
  • 4º Remember that we can always find a way around it (Sir William Rowan Hamilton :rofl:)

Thanks, I'll look into it all.
For now I'm learning here by putting the shopping list with 3 real screens into another app with 13 virtual screens.
So far with the help of the guys in here I managed to put 10. And today a last one came up with 3 real screens.
Extremely difficult for me, because there are buttons that lead to real screens, and now I have to find a way for them to lead to the virtual screens

1 Like

Come on! ...don't let your spirits falter, you're already close to the goal. Remember that the buttons to go from one screen to another must now "hide" and show the arrangements.

1 Like

it's like those "Hmmmm...." moments.

But like Ron Damon say: "...don't let your spirits falter..." everything teach you something.

  • Today it is an App with 17 screens, but tomorrow... optimization (we always end up optimizing)
    And here we will be too... Also saying: "...don't let your spirits falter..." :grin:

I will do it.
I put all ready the 2 screens. With a first look, works good.


The button make a new list doesn't work properly and pressing it brings up the first real screen and not the virtual No11