Blank screen after switching screens

Thank you for your help anyway.

Welcome to the Community Leo.

There is too much wrong with your code.

Firstly, you do not need a screen for each possible result - only one screen can be displayed at a time, so design your App to use one result screen.

Secondly, you cannot use "open another screen" to open Screen1. Screen1 already exists in memory, so you are opening additional Screen1s and that will crash or lock your App (Blank Screen).

We cannot follow the flow of your code from the Blocks you have posted, but if you fix the issues I have explained, your App may be OK.

1 Like

Thank ou for your feedback. I tried to follow your advice and deleted all screens with the exception of screen 1.


Then I created the following one:

Even so, a blank screen appears when I press the calculate button.

What does blank screen mean? Can you record a video or take a screenshot of this blank screen? Do you mean that you don't have any labels, buttons or other components on the screen? Don't they just fill it with data?

1 Like

Where is the calculate button? Where are the values it should calculate? Perhaps there is an error in your equation such that the App hangs (locks up) when trying to solve it?

Also, using only two Screens now, your 'open another screen' is not appropriate. Open Screen 2 from Screen 1. To return the User to Screen1 simply, close Screen2.

1 Like

It was the same here on IOS as well. Download this aia and try it out for yourself. see if the data from screen 1 appears on screen 2.

1 Like

Hi, sorry for the delayed response. This is what I mean by blank screen:


I also downloaded the file you uploaded and this is what I got:

Hi, sorry for the delayed response. This is the "Calculate" button:


And this is its code:

(the formula in there is weight/height*height)
Regarding the closing/opening of another screen, I tried to follow your advice and this is what I got now for screen 2:

As you can see in my example screen 2 opens correctly. Also data 12345 is passed from screen1 to screen2 so everything is ok on ai2 side. There is a bug somewhere in your aia project.
All we can do is check your project in our tel. Put your aia here.

1 Like

Ok, here it is:
CALCULADOR_IMC (1).aia (75.0 KB)

1 Like

It shows up fine on android. Maybe try to start from the beginning and create these screens in a new project, but don't copy the screens, just make them manually.

When testing in companion, did you try to switch the screen manually? In the green bar next to the name of the app. After selecting screen2, screen2 should appear in the companion.

This is what shows up if I try to change the screens, manually:

So there is some bug with companion, or your project is corrupted internally somehow. Try creating a completely new project.

Since the project works fine on android and shows weird errors on iPhone, maybe @ewpatton would like to take a look at it. Screen3 exists in your app so there shouldn't be a problem with it.
But instead of horizontal and vertical layouts, it contains a table that I don't trust and that has had problems in the past... and I'm wondering if it's not a table problem.

I understand but I personally do not think it is a table problem. This error happens with all screens if I keep switching for long enough:


If I had to guess, I would say that there is something wrong happening with the BMI formula calculation. In my opinion this is somehow messing up with the project. A friend of mine did a similar project but with the formula result showing up in the same screen in which you input your data and it worked propperly (he is also using IOS).

Try it

CALCULADOR_IMC_1.aia (74.9 KB)

Your images should also be sized to match the size of the buttons.

Leo, in Screen3 you are using a Table Arrangement, for which unfortunately there are occasions when file corruption is caused.

Delete Screen3, create a new Screen3, arrange the GUI again using Horizontal and Vertical Arrangements.

See my edit below for Screen1 and 2. Screen3 should be called and closed in the same way Screen2 is.

Note the safety check - are there values in INSERIR_ALTURA and INSERIR_PESO.

Note also that to use Textboxes for numbers, the Properties palette option "Numbers Only" should be ticked.

Finally, button USUARIO could not be seen on my phone, it was off screen, so I reduced the height of it's Arrangement and made the screen scrollable.

CALCULADOR_IMC_Edit2.aia (73.9 KB)

Thank you for your feedback. I tried using your file and it worked once, but then it suddenly stopped working. Also, if the values for height(=altura) and weight (=peso) are empty, Screen2 loads propperly. That is wwhy I think the formula is messing up the loading of the screen.

That is another App-Killer issue Leo. Your images are far too large. Read this:
ProfessorCad: Tips & Tricks Images