TinyDB with buttons

Thank you so much

Okay I think it's because I have vertical arrangement and not vertical scroll arrangement

Talking to yourself :grimacing:


I changed to vertical scroll and noy I get this
TR (2).aia (127.6 KB)
I send you the "final version"

Whereabouts? On a Virtual Screen? Which one?

Screen 'Jugadors' must not be Scrollable because the Virtual Screens it hosts are already Scrollable. It should be Align Horizontal Center (all Screens and Virtual Screens should be).

Always select the Font typeface for every component that has text, otherwise there could be surprises on different phones.

Tip: in the Designer area, hold the Ctrl key down to select several components - they can then all have their common properties changed in one go.

All the texts are in the default font, should I change it?

Yes. In fact, if you wish, you can upload a font into Media and use that.

I think I'll do that because I changed to sans seriff and I get the same problem

I see the error message is on Screen Jugadors. Looking into it now.

Yeah,the error message appear when the screen Jugadors initializice

Hi Carles

Well, TR2 deviates a bit from my guideline. Your Screen1 is a terrible waste (Screen1 is the 'king' of Screens) - The Intro/Splash could a Virtual Screen, and the other Virtual Screens would also be on Screen1 as per my example.

The Splash image should be in an image component so that it does not get stretched/squeezed but scaled by Android if required.

The System error message is about a collection of Text Boxes but I have not figured out what is wrong. One strange thing - most player number boxes have a number but the last one has 'pi' - that should be alright but looks odd? How did you make the Juadors Screen - is it all new or did you edit it by replacing the original Table Component? I ask because there may be some back-end file corruption.

There are errors in the 'when any button touch up' Block:

Also with Jugadors, VirtualScroll_VS2_PlayerManager, All the components should be labelled logically and sequentially as I have shown in the example - currently you have components whose name = a player name when they should be neutral.

Doesn't matter, the back file seems to be in perfect order with the correct number of TextBox components (23) and no table component.

OK, it's the 11 Text Boxes for Player Names that trigger the Error Message:

TextBoxesNames

I discovered that by deleting two of them - the error message was then only about 9 Text Boxes. It does not seem to be the Text Box Components themselves - I have tried renaming them and replacing them - System error remains the same.

Finally worked it out. In my example, the first screen displayed is the Record Stats Virtual Screen. This is because the two Player Records, 'All Players (squad)' and 'Match Day Players (team)' will normally have been saved in TinyDb and loaded on Screen Initialise. If they have not been saved or the User wants to change the Match Day Players, there is a button to take you to the Player Manager Virtual Screen.

In your Project, you open the Player Manager Virtual Screen first, and so if the records have not been stored in TinyDb beforehand, the code calls the Virtual Screen that is already on display.

So three Virtual Screen Fixes:

  1. From the Splash Screen, Virtual Screen1 should be displayed.
  2. The Splash Screen should also be a Virtual Screen.
  3. All the App Screens should be Virtual Screens on Screen1 (Screen1 being the only 'real' Screen).

So what should I do, do it all on screen 1?
And if it can be, explain to me about the order of the VS because I don't understand it

Hi Carles

Have all Virtual Screens, all on Screen1. There might be an exception such as a privacy policy Screen later on, but otherwise the benefit of having your most important data in the same App memory is huge. Having your 'Splash' Screen as a VS too will give Screen1 time to initialise.

Regarding the order of VS:

  1. #VS1 The Splash Screen is always displayed first.
  2. #VS2 The Next VS, via the Button on #VS1, should be the Data-Collecting Match Day Team Screen, because most often that will be as required or nearly as required every Match Day. If there is nothing stored in TinyDb, the code takes the User to #VS3 instead.
  3. The other two VS, Player Manager (Squad) #VS3 and Statistics Calculation and Display #VS4 can be called on demand from #VS2.

That is how I would do it. Here is an updated example. I have not incorporated the T1, T2 etc buttons nor the Chronometer. When editing in the designer you can set the Scroll to true but remember to reset to false before running the App. Always ensure the App is in it's initial state #VS1 before running.

RecordBasketsVirtual_Update.aia (115.0 KB)

I changed all to screen1 and I still getting the same error.
TR (3).aia (172.3 KB)