MIT App Inventor and 100+ esp32, how could I do this?!

It took me a day and a night to understand what you mean by "do nothing". But... when the language barrier between a noob (I) and a professional (Kevin) has no importance, I understand the fact that "do nothing" means that if something exists... do something, if something does not exist... "do nothing". So...

Deactivate_Activate_DoNothing.aia (92.9 KB)

A perfectly functional dynamically generated STATIC!!! layout! Of course, a real professional can make it better. But...

The week after that (until today), I fought with the second approach of the same functional layout, without "do nothing". And here I'm stuck.

I try to use @Kevinkun CompCreator - OnClick and OffClick procedures. The OffClick procedure I think that I understand it. But the OnClick procedure, I don't understand how to implement them, correctly in that case.

Also, I try another three extensions that seem to be simplest to use, without luck

Deactivate_Activate_OnOff.aia (93.3 KB)

Can/have time/want somebody to correct my errors on the above .aia?! In that case, I will understand where my understanding of logic fails or my lack of AI2 culture must be improved (on what I need for my project, I'll never be a professional on AI2).

Thank you in advance, Dan

sorry but I really can not understand what You want to achieve.
can you explain in brief words? or in a drawing / sketch?

above are two images and two .aia as an example. Deactivate_Activate_DoNothing.aia work as expected, generate 4 "small cells" with some info on them about the layout and a button on every 4 cells. when touching any of the 4 buttons from any cells, deactivate all 4 buttons from the small cells, and "it opens" a new "overlapped cell" with some info and a button. when I touch that button, it closes the overlapped cell and re-activates all 4 buttons from the 4 small cells.

generate an arrangement with 4 cells and a button on every cell -> click one of the 4 buttons -> deactivate the 4 buttons from small cells and display overlapped cell with a button -> click overlapped cell button -> close the overlapped cell and reactivate the 4 buttons from the small 4 cells.

in the first .aia above, all works as expected.

in the second .aia, the second image, Deactivate_Activate_OnOff.aia, I try to obtain the same result using the OffClick and OnClick methods implemented on the CompCreator, to use those methods correctly between two or three procedures.

here is a demo.
click the button in the cell, an overlap will show up and you can not click any other buttons except the one on the overlap.

As I said previously, the overlap view can be a static one, no need to create dynamicly.


compcreator (1).aia (96.8 KB)
the demo is on screen 'overlap'.

Thank you very much @Kevinkun , from your help/examples on this thread, I learned a lot.

Now I have two questions. Below I create an example of what I want to achieve.

1 - Did I correctly use the DragAndDrop together with CompCreator?! If yes, why did it crash the companion without any error message when I wanted to drag an arrangement, I moved it about 10 pixels and dropped it in himself.

2 - As you can see in the blocks when I click on the button, I want to create with a template and CompCreator, in Vertical Arrangement 8 a replica of what I drew with squares in Vertical Arrangement 1.

For that, I need to "read" the template/JSON from VerticalArrangement1, the million dollars question is how can I do that?!

DragAndDrop.aia (67.2 KB)

Thank you all in advance for all that can help.

Sorry Iam not familiar with DragAndDrop. You can make some static layout and test if it works.

and the create with template function need a template, which can not be an empty string.

I know that can't be an empty string, It is just an exemplification of what I need.

What I think, is the fact that the layout that VerticalArrangement1 has as dynamically generated, can be the same as a statical one. What can be used to obtain JSON data from a statical arrangement?

in fact i am lost what you want to do. it seems that you have changed your mind for how to show your app layout.

Oh... no, no, no. The layout for the app is just working more beautifully than ever I can expect, due to your help !!! This is not another approach for the app layout!!!

This is a possible approach to how can I draw connectors! There are hundreds or more connector types/shapes.

I already can draw any type of connector with CompCreator!!! In a let's say... "static mode". I use some complicated logic to give to some procedures that have CompCreator and KevinKunEnhance inside, and in function of those numbers and some CheckBoxes, it creates almost any type of connector!!! So... I already have a technique/method to draw connectors!!! :innocent:

But this approach (visual-based drawing of connectors) is a dream for a collaborative approach, anyone will have the possibility to draw any type of connector visually!!!

For that reason, I want to learn how to use the JSON/templates on my app.

Below you can see the basic test for layout and the first-ever L12-ECU connector, all drawn with CompCreator! :smiling_face_with_three_hearts:

On this test I have all that I need for the moment for layout, The sliders are synchronized, the big cell can be moved on all parts of the screen, and can be "pinned" to not move from error when I touch the slider... "unpinned"... and so on.

@Kevinkun what did I do wrong? I want to remove a dynamic component when DragAndDrop2.DropCompleted. I tried 5 methods, all gave me errors. :sob:

DragAndDrop.aia (102.6 KB)

This is not a problem about CompCreator, but this DragAndDrop extension.
But I dont't think it 's necessary to remove the component after moving it, since it will moved from its original place to desitination.
If you really want to remove it, maybe you need to un-register this componnet for drag first.

Of course, it is not a problem with CompCreator, it is a problem with DragAndDrop because I try to remove a "thing" from a list (a global variable list with all generated arrangements) and it gives me the same error.

Let's ask @Ken about this problem. Anyway, I have a problem with DragAndDrop that crashes the companion if I use "Drag" and "Drop" in the same arrangement!

@Kevinkun How can I correctly use the "HtmlFormat" for a label?

What did I do wrong?!

enn, another issue need to update.

you can use HTMLFormat in a text block, not HtmlFormat.

and why terms and conditions needs to be dynamic? just drag in a label, that will make your work much easier.

as you see... the first block is a native label that works as expected. but just in case... I test it with a dynamic label... to give you more... work... around that wonderful extension... it have years without any update... :innocent:

21 posts were split to a new topic: Unicode for question marks in a circle

A post was split to a new topic: I want to generate the "quick help tips window"

A post was merged into an existing topic: I want to generate the "quick help tips window"