So, "ContactPickCount" is just an integer, it doesn't have a length (of list), so perhaps that is the cause of the error message......
-
After Picking, check that the ContactPickCount does not exceed the number of available text boxes (length of List).
-
If it does not, set the values into the text boxes of index number ContactPickCount.
-
If it does - tell the User the number of SOS contacts is exceeded and ask if they want to overwrite an existing contact with the one just picked.
...since this is a contacts editing thing, after picking a contact, you could just ask the User to click the TextBox that the Contact data should populate. That way, the text box list index is never exceeded and the User is calling all the shots directly. Food for thought?
Off topic: This is a Robot made for me by my 3 year old grandaughter Mya:
ok thanks @ChrisWard
i will surely see for it
this is lovely
nice creativity by your granddaughter Mya
PS:- you are my savior
hi @ChrisWard
actually if i remove it then the same problem is faced
........
1 thing again which needs to be noticed :-
See the code needed to be changed(only a bit) when i am taking values from another screen via tinyDB but as per your advice i used "Virtual Screen"
so indirectly there is no change in the blocks , right??
before using the virtual screen , everything worked great
so why not now??
there is no change
except i just applied the "virtual screen method"
u may see the code:-
tq
i again noticed 1 thing which really surprised me!!!
this is SOS button project (unchanged):-
i was really disappointed by the behavior of my app project so i just thought to once check your code (to see whether it worked well or not ) and i know your project has a limit of adding 7 contacts but it shows this error when i try to add the 4th (this did not happened earlier)
i still have spaces to add more but i am not able to in the mobile phone!
and yes u were correct , we must keep testing our app again & again
thanks
Hi Shobha
I can't see anything too wrong (some code is repeated that need not be) but it is difficult to get the context from the Blocks alone. We should test the Pick Count against the List Length before trying to set a TextBox with Pick count as the List Index:
ok thank you
i will surely make the changes & test it again & also inform u about that
So, the major thing is that you are hiding-showing labels and other components. You don't need to do that - just hide-show they arrangement the are on.
Also, you can reduce the Blocks when things are repeated. For example, you use a Notifier with the same settings twice, but you only need to set it once:
actually , my screen has buttons & labels in it as the main screen so i am hiding all
just really need to confirm :-
did u meant that i can have all the arrangements & the labels?buttons in 1 vertical arrangement & just hide / show that?
ok thanks @ Chirstopher John Ward (first time wrote your full name )
i will make the changes
Yes - use whichever Arrangement suits the task best. If necessary, it is possible to use an arrangement inside another arrangement, but we can't do that "too much" else the App Inventor compiler may not understand our intent.
When you have your Arrangements sorted out, perhaps I could see your Project File to understand what still triggers the error.
...my mother used to call me Christopher when she was angry with me
that's really funny "Christopher"
EDIT : i just wrote Christopher but that does not mean i am angry
A post was split to a new topic: Can we create a top button which automatically scrolls up the screen
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.