2014년 12월 6일 토요일

TinyDB with coursework

So I'm making a computer reservation system for my coursework but I've run into a problem. I've made it so that a label changes value +1 or -1 when book or cancel is clicked and set that up with tinydb so it stores the value but I read that you must complete this for 8 rooms. My code consists of code like this http://gyazo.com/f38b677a2d23ef1e0aaa2cb8065c96f7 but as you can see, that only works for the room ICT. I need to get it so that when I'm on this screen http://gyazo.com/deddf1ad2ca25b5278a3cc1a21f93040 and I click one of the rooms it loads up the specific tag (They must all link to the same exact screen though (Booking_Screen). Is it possible? Is there a way I can make it so that a specific button on another screen will replace all text values (Block editor ones) with ENGLISH instead of ICT so it loads the computers that are available in that specific room?



I'm not going to seach and click on links to see your blocks.

Use the Snipping Tool in Windows 7 or 8 (I don't know what you're using because you didn't take the time to choose those categories either), save the snips to your computer, and then post them here as screenshots so we can see what you're doing.



For using the computer map, I would use a Canvas with that map of the computers set as the background image.   Find the Canvas coordinates of the hot spots and use them to identify the room/computer station.  When a boundary is met, it will point to the workstation.  There is  logic code in  http://www.appinventor.org/Chapter18           that discusses programming complex conditions ...it shows an example using latitude/longitude and defining boundaries...the same reasoning will work with Canvas coordinates to define a boundary or hot spot

A second way would be to use the Canvas map backgrount, then put a sprite on each of the stations and using the Touched parameter of the sprite to identify the work station.

Try some blocks.   Are you programming in App Inventor Classic?     You should be programming in App Inventor 2; support for AI Classic is scheduled to stop soon according to MIT.


댓글 없음:

댓글 쓰기