2014년 12월 30일 화요일

Copy screens

I'm writting here to solve a problem with app inventor. I have an app with one screen full of blocks and I need the same screen (the style and the blocks) but only changing 2 o 3 values. Then I dont want to rewrite all agaiiiiiiiiiiiiinn! I'm looking for how copy a screen on the Internet and I found out a video of a boy doing it (Hossein) but it doesnt work.
Somebody knows how to do it? If it's not possible, PLEASE APP INVENTOR try to include this options PLEASE! I think it's important for creating apps quickly.



you should avoid redundancy, to copy blocks to another screen which does almost the same is considered bad programming style

please read the following document to find out, how to avoid this



It depends of the app you want to create. See my example:
I have an iron piece and in the app you can change the dimensions and the force to which it's subjected. If the force is >x the pice has ones conditions and if the force is <x has anothers. Then, i need 2 screens with these differents conditions and the mathematics equations are really similars...

Even so, although I need to improve my knowlege about programming (im a civil engineer), the solution is not say: DONT DO THAT. I wanna do it and i wanna learn how to do it, not like you that give me this solution;)



As Taifun said, you want to avoid redundancy.  For example... You do NOT need two screens in App Inventor to do what you want to do.  You could have both situations in two separate arrangments, one visible and the other, invisible.  Let's say the arrangement that's visible is the iron piece with >x applied, and you want to show the <x applied, you simply make the > arrangement invisible and the < arrangement visible.

Don't try to overbuild... as a civil engineer, you know exactly what that means...



Okey, I accept your phylosophy and I practise it: "If you dont know how to do something, look for others ways". But it's important discover how to do things that you dont know, in order to increase your mental capacity. If Einsten had thought like you, never we heard about the gravity. Dont talk like a goods progammers if you arent, and if someone write a post in the forums, dont try to put him down. Keep calm please!:)



If perhaps you REALLY need that many screens, Screen1 is always the first screen, but you can rearrange them or copy information from one screen to another using this method:
How to copy screens by Scott and a video by Hossein .   (you have seen the video, the advice is easier to understand; try it).

You are correct Trufa, sometimes additional screens are a very good solution.    You have to figure out how YOU want to design your app.   Frequently reusing objects on a single screen works well, however designing on a single screen, in many ways is more complicated.  Designing on a single screen avoids passing variables, multiple copies of TinyDB etc.  But if you do not need those, the use more screens;   be aware 10 Screens is the practical limit with AI2.   Use more than 10 and AI2 starts to become unstable.



Please keep in mind that you have two basic limitations in App Inventor... no more than 10 screens, and your AIA file cannot exceed 5MB unless you're using a personal local server.

Nobody here is trying to "put you down," and we're all VERY good programmers.  What we're doing is giving you sound advice.



Thank you SteveJG!:)

This is the veido i've said that I've watched. I'll do the same and App Inventor reports me a bug:( I dont know what is the problem. Thi evening I pass this video to a
informatic friend and later i'm going to write his opinion here (if it's correct and if not the solution if he finds it).
Thanks!^^



Thanks for the advises! (but i've never had more than 3/4 screens xD).


댓글 없음:

댓글 쓰기