2014년 12월 24일 수요일

advice for managing opening more screen similar

advice for managing opening more screen similar

courses in a screen can have up to 5 courses

example
mathematics
history
geography

when the user inserts the description of the course I added a number in front
example

1_
mathematics
2_
history
3_
geography

to know which screen to open the next one in the case of mathematics and 2 in the case of history

except everything with TinyDB the problem is that eliminating such1_matematica
remain only
2_
history
3_
geography

when I add a new course being free position I put 3
3_ name new course

then two courses open the screen 3 how to run a still correct that allowsyou to open the right screen?




somehow I do not understand the question?
but probably this can help:

The recommended method of switching screens in App Inventor



I think tomorrow is the study thanks.



my problem is to assign to the new course the first number from 1 to 5that has not already been in the courses already

example
if they are already present
courses 1courses 3

the new course will be 
courses 2
what will be the course after 4 and then 
courses 5

so that two courses have never the same number





It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.



Is this a time slot scheduling problem?



I'll explain:

I enclose two images

as you can see I ask the user to enter the name of the course thenevent notifier1 aftertextinput
control button which contains the description "Empty .." and I put the item in the list with the corresponding number

then save and load elements in the 5 buttons on the screen

see attachments mit3.jpg and mit4.jpg

But if I have for example

  
course1
  
course2
  
course3

and delete the two get
course 1course 3

when I insert another
is free, button 3 and calls
new course 3

same button number 2 (ie content, the 3)

QUESTION ********* ******
while I wish that before assigning the number associated with thecourse can control which numbers 5 numbers available are free and not yet assegnait to another button example

button1 -> 1 course
button 2 ---> 3 course
button 3 is free

the new course will be inserted into the button 3 but with the number 2of the 5 first free number available and not yet assigned


some help?




I had forgotten attachments here they are








Have you worked with lists and List Views yet?
A List View, when opened, can look like and behave like
a collection of buttons containing the texts that you would
put into your five buttons.

Because you an insert into any position in a list,
you can fill gaps automatically.



I've attached a sample app that juggles two lists
using two List Views and a button whose text
holds the item being moved in or out
of a list.
The List Views can push or pull their selected
item in or out of the button.
To allow an empty list to receive an item
(when no selection is possible), push the button.

Maybe this matches what you were trying to do?














thanks for the example I try to study it and I hope to make my case, thank you.


댓글 없음:

댓글 쓰기