2016년 12월 28일 수요일

Searching for string, warning and error in Blocks view


Often times once "code" grows to a certain size, a lot of my time was spent on looking for where the code is - navigating in block view becomes really slow. Using string search in the browser does not make the found text in blocks visible. For now, I download the .aia file, and unzip it and search in the corresponding .bky file, but it's a pain. By the time I found the string that I want, I may have already forgotten why I was looking for it in the first place. Error and warning become hard to find especially when you paste blocks from backpack. And it would have help if "Download blocks as Image" would work, but I think it only works up to a certain size.

I would think it should be easy to add a search feature each in Block view for searching string, error and warning. The block viewer should display the block where the string, error or warning is found. It should also be easy to propagate from one found block to the next. Is this suggestion something that you would want as well? Or, has I been doing it the wrong way and there is a straightforward way to search?

--
a search feature is on the list of MIT

the recommendation is to collapse your blocks and expand only those, you are currently working on

and the question is, why did your code grow so much...
it probably helps to look into how to avoid redundancy http://twodogapps.com/?page_id=686#Redundancy and how to use procedures http://twodogapps.com/?page_id=686#Procedures

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of AppInventor, then try something and follow the
 Top 5 Tips: How to learn App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

-- 
Thanks, Taifun, it's good to hear that search feature is on the list.

I have been quite careful not to repeat my blocks as I would have been using any programming languages. However, it's inevitable that the number lines of code, or in this case the number of blocks, is proportional to the number of features one adds in. And, the fact that blocks generally take more space than lines of code and are slower than code to be moved around the viewer. So, I will collapse my blocks to avoid the problem - that makes perfect sense. I don't do it often because there is no quick keys to collapse and expand all, and one wrong click may lead to accidentally deleting blocks.

I had gone through quite some tutorials and they are helpful. Thanks for the pointers and your time to help.

-- 
Actually, I was wrong, it allows me to collapse and expand all blocks at once. My bad. I will definitely collapse them more often. Thanks again!

-- 


댓글 1개: