Is there a way to lock working sections of an application so they don't get disturbed by an inadvertent mouse click or drag? I am making progress but keep noticing errors that have crept in somewhere when trying to lay things out in a tidier format.
I am suggesting and extra item in the right click menu like "disable block"/"enable block" but it just "locks" and "unlocks" the block and its children from being disrupted functionally. They should be capable of being re-organised on the screen
Just move these blocks to an area you will not work in. I tend to set out my blocks in columns by function/activity, using a separate variable block (disabled) as a header. In this way I can know where to go in the blocks editor.
That is a possibility but I am sure there are many of us new starters who haven't really worked out an optimal "style" yet. I keep moving my blocks around trying to tidy things up. Blocks then aren't where I thought they were, end up overlapping or have disappeared completely only to be found in some corner of the screen. All this has the tendency to introduce bugs that are unnecessary. The red "X" counter has clicked up and the search for the problem begins to find missing blocks and reunite them with their parents. In conventional languages we have libraries and header files that keep things safely out of the way.
It is a suggestion, that maybe the experts can do without, but one of the purposes of MITAI2 is teaching and all those students will have the same problem.
When you have too many blocks spread out over too large a surface area,
the Blocks Editor hits a complexity limit when it tries to generate a blocks.png file for the screen.
There are two main approaches to deal with this:
Start a Google Doc with a Table of Contents explaining your app, with sections for Design, Data, Code, including Downloaded Png images of all Events, Procedures, Globals, and with html cross-links for easy navigation. Such a doc becomes easier to read than a complete blocks image, because you have FIND, Next, PREV, back functionality, and you can add paragraphs of commentary around your code. This is my preferred life saver when doing a very large complex app. If you go this route, try to arrange your blocks geographically in a column matching the order of your Table of Contents, then do periodic Clean Up Blocks to pull them inline. This sometimes lowers the load on the Blocks Editor.
Reduce your block count:
Use parametrized procedures for common code
Use Media text files instead of big clumps of text blocks
Use generic blocks instead of repeating component event blocks
Encode repeating decision patterns into lookup tables loaded from Media csv text files (does your blocks image look like a box of combs?)
You don't need a component for every data instance. Reuse those components.
If you can't fit data into a ListView or List Picker, show a small subset of the data in an Arrangement and slide it across the larger list of data.
Thank you for the advice. As I have said I am new to this and keep finding new stuff in the toy-box. Only minutes ago stumbled across right click of the workspace
Which will be a great help in keeping things tidy. One thought I had considered was a grid to help navigation and it appears to be there.
Delete 446 blocks does seem a bit dangerous though.
You might want to collapse all blocks and order them by type: variables, evvents and procedures
Then expand only those blocks you are currently working on
You might also consider using the right click option Download Blocks as Image PNG on your procedure definitions and events, saving them individually under their respective names. If you don't edit them, they should be draggable from your hard drive into new projects.
Does that really work? Save the .png as a separate file and they can be re-imported as a fully functional block?
"if you don't edit them"? Edit them as a .png or edit them in the original application? If you do edit them in the original application, they will still function as they were, before the edit, in any application they get imported into?
The PNG files don't have any references to the app where they were created. All references to components are by name, so imported blocks will have red flags until the names are matched up to components in the new app.
I have now tried it. It only works for a .png saved from IA2 directly to a local file or, probably, one that directly originated from AI2. A copy of block .png from elsewhere, like a forum post won't work