Better ways to (re)organize code blocks?

Skip to first unread message
Assigned to by me

Ted Inoue

Feb 19, 2014, 5:08:12 PM2/19/14
Please SEARCH in this forum before posting your question.   There's a good chance your question has already been asked.

If you are asking for technical help, you must provide the following information:
- Are you using MIT App Inventor Classic, MIT App Inventor 2, or something else (what?)
- What OS are you using? (e.g, MacOS 1.8, Windows 8, ...)
- What browser are you using (e.g, Chrome version 30, Firefox 24, IE 8, ...)
Also provide as much information as you can, such as screenshots and instructions that will let others duplicate the issue.

Prototyping a fairly complex geolocation / mapping app using App Inventor 2 on Windows 7 in Chrome  32.0.1700.107

I'm at the point where the freeform layout of code blocks has become a hindrance to my development. I started with an organized "sheet of paper", all globals defined at the top, procedures grouped, etc. but as development progressed, it's now become jumbled.

At the very least, I'd like some way of selecting a group of block (i.e. my globals) so that they can be dragged en masse to a desired location. Currently, I have to click and drag each item, drop it, scroll the page, drag it again, scroll again, etc. 

Otherwise, I'm amazed by what can be accomplished with this learning platform. It's exceeded my expectations.


Feb 19, 2014, 5:12:50 PM2/19/14
Hi Ted:

Nope, you simply can't do that in AI.  You can Arrange Blocks Horizontally, or vertically, but you can't group blocks nor can you multi-select blocks.

If you organize them yourself by sliding them around, they will "mostly" stay in that configuration.  I say mostly because them tend to creep a bit now and then.


Feb 19, 2014, 5:20:24 PM2/19/14
Yes, the lack of multi-block selection and mechanisms for organizing blocks are frustrating aspects of App Inventor. These items are on our to-do list. I've posted a summer internship project to address issues like these, so, with some luck, progress may be made on this over the summer. 

- lyn -


Feb 19, 2014, 6:13:22 PM2/19/14
Collapsing blocks helps.  Many, if not all of us, share your frustration with organizing the blocks.

I would be very happy with a command to have the cursor find occurrences of certain blocks or places where a certain variable is listed.

Good luck with your mapping project.   I am writing a geocache app and am probably doing stuff similar to what you are working with.
Actually the app is 'finished.'; I am waiting for the SDcard read/write before publishing it for general use.   Have you managed to set the blocks's up for Vincenty's algorithm or are you using haversines?  or not bothering with distance measurements at all?I am having math issues and and almost convinced there is a bug in the atan2  and possibly other trig functions.


Ted Inoue

Feb 19, 2014, 8:50:39 PM2/19/14
Re: higher accuracy mapping transformations - no, I've not attempted this. For my app and the resolution of the GPS, the simple approximations should be good enough. My app mainly involves maintaining a database of geotagged locations. Scaling those back onto a map is the only tricky part and as long as I'm in the rough vicinity, I'm good to go.

Thanks for the warnings about the trig functions. Problems with built-in functions can make for serious debugging headaches!


Feb 20, 2014, 8:08:27 AM2/20/14
I am having math issues and and almost convinced there is a bug in the atan2  and possibly other trig functions.
yoiu might want to provide a small example so others can check

Reply all
Reply to author
0 new messages