CompCreator - DynamicComponents compatibility

please

Simplified version of above .aia. This is the final version for me as DragAndDrop that I will use on my app. Need more things in the future, but it just works perfectly with only 169 blocks. The only bug is that crash when an arrangement drops on itself.

DragAndDropDynCompLast.aia (101.5 KB)

Thank you Tim.

PS - Catch and drag arrangements on the big rectangle, you can move an arrangement on another arrangement, or you can delete an arrangement by moving it on the bottom-right small square.

Above you have an example.

Thank you.

@TIMAI2 Just imagine the potential of that approach only for the open-source communities, like Arduino World (I don't speak about industrial automation potential...). To have the possibility to drag and drop gauges, sliders, sensors, LED's, esp32, and so on... Just push a button and connect them all.

This kind of approach can open a new window on the "big screen community". Real estate, architecture, maps... You name it. But for that, a DragAndDrop extension is needed that doesn't crash.

In fact, the compatibility between DragAndDrop, CompCreator, and DynamicComponents, from my tests, is the key (as doesn't exist an extension that does alone, all that).

Not crashing for me

a quick demo

and is the same on two tablets and the 27" 4K chrome box, compiled as apk included crash.

Probably it helps to use logcat to find out more about that crash....

Taifun

I'm 100% sure that DragAndDrop creates a "paradox" when wants to drop on himself, it is a bug of it. Ken omitted to include a condition to prevent this behavior (almost sure then don't think at the possibility that somebody will use that extension for that purpose.). It is a great pity that it has this bug because it is the only extension that can "slide" when dropped.

Thank you Taifun for looking here.

Given that it does not crash for me, it could well be a local/hardware issue at your end. Take @Taifun's advice, and run logcat to see what is causing the crash.

I am also concerned that you may be running two component creation extensions in your larger app, they may have some conflict with each other? Best to pick just one, and only one. They both do the same thing.

From the hardware point of view, I'm 100% sure that is not. Can be from the companion?! But companion that runs on 3 devices... I don't think so. From CompCreator together with DynamicComponents I'm pretty sure that is no problem because I used them together in another test and it works great.

I'm 100% sure that is the DragAndDrop fought because if I don't use it to drag and drop on the same arrangement all works great!

@Taifun Can you please test this .aia to see if it on your part crashed?

Thank you in advance.

Sorry, I'm on mobile currently...

Taifun

I'm not sure that both do the same things, for example, DynamicComponents can't show .Parent, .Children and (for that reason a part of the logic from DragAndDrop) and CompCreator don't have an "id" associated with a component to create the logic behind tagData for every arrangement created (to create and identify multiple same arrangements, eg: VerticalArrangement, with different attributes).

So for me, they both, one complements the other. It is just an opinion(or I don't discover how to do only with one of them, the above .aia).

With CompCreator you can add created components to a list, then use the indexes in that list as "ids", or simply compare the component values.

1 Like

That technique I use it on below/above the first big aia... And it took me about 600 blocs... :exploding_head: The last .aia it have about 200 blocks.

BTW... I just discovered the fact that DynamicComponents it is compatible with KevinkunEnhance. .SetAsCard for example but is not compatible with CompCreator.SetValue! :exploding_head:

As Spain approved last year the euthanasia rights law... I hope that I will not use this right that I have it... due to the compatibility, not compatibility, crashes, or glitches in the matrix that I am able to generate on the way to do this app...

@TIMAI2 Can I ask you if you know an estimated price range that can cost me somebody to make an extension like DragAndDrop?! I searched here on AI2 and on Kodular but without success, I only found prices $5-$10 for an extension... And for me seems to be unreal. Making an extension took time... I don't know if $10 compensates that time... Only if it is sold to at least 100 people.

Don't understand this works just fine

DynamicComponents... with something like that... CompCreator.SetValue gives error... width, high, aligns...

The below blocks works, if I change the decoration with above, give error.

Nope, still no issue:

What was the error ?

The error is that you are not understanding me... The language barrier?! I speak about DynamicComponents together with CompCreator together with KevinkunEnhance...

Look carefully please at the last two images!

:innocent:

2 posts were split to a new topic: How to log in on a WordPress website with API

  1. CompCreator is inspired from DynamicComponent, even some code is from it. But there is no need to use them both mixed up.
  2. if you really want give the component an ID, and retrieve the component by ID, you just use a dictionary:
  3. the Children and Parent function will not work if you use DragAndDrop. you need to implement that by yourself.