Hi everyone,
Pretty much every time I launch my app, it checks the day of the week and adds 1 to that day's logins. But in this case, even though I log in repeatedly, the count stays at 1. What am I doing wrong?
Regards
Nicola
I tried adding the variable and not the label, but nothing changed
Use doit, and most likely it is case sensitive.
Show all of your Screen1.Initialize
Dear Nicola,
this is what happened a few days ago in a thread of yours:
In the current thread, in the snapshot of your first post, you still use a label to perform a computation.
What about to use a "true" variable (i.e. the orange "Martedì") to perform the sum ?
And: does the .apk behave differently from the companion ?
Ciao.
I forgot that performing mathematical operations in Initialize is not recommended; in fact, when I moved everything into a button, it worked perfectly.
We never stop learning ! ![]()
Indeed, that's exactly how it is. However, within the same app, I tried to add numeric variables, but the result was "0." ![]()
Did you apply Do It to the set global block to cause the addition block to run?
If not, the total variable would still have its initial value.
You can simplify this by replacing the global total variable with a value procedure of the same name, that calculates the sum of those other global variables on the right.
Every place you reference the total variable, replace it with a call to the value procedure.
Once you have replaced all references to the total variable, delete its global init block.
That will leave you with one less dependency to burden you.
I can also put it in a procedure as you are suggesting; but I can't understand why "TotAperture" doesn't give me the total sum of all the variables.
It looks like you forgot to do a Do it onto the set block. Without that, TotAperture will not be updated
.
Taifun
But the thing I can't understand is why doing do it on set TotAperture the sum happens and then in the companion it doesn't do it
I'm not able to respond to yuu question, but noted that after setting toAperture ( to the sum of... ) you have toAperture:=toAperture
It shouldn't harm, but not necessary
P.S.
Sorry for the ".=" thing... but pascal lives in me ; - )
Hello Sir! I will check it out and see what is wrong!





