[Free] CompCreator - create component dynamically

Not using that block, using the template, see above.

yes its a typo, need to be fixed.
but I am away from my computer and i can fix this on Wednesday.

In V8, there is a scenario where deletion fails:

Add some dynamic Sprites, record them in a List specifically for dynamic sprites only.

  1. Delete the Sprites via a loop through the List - success
  2. Disable the Sprites (stop the User from moving them inadvertently when painting). Delete the Sprites via a loop through the List - success
  3. Disable the Sprites (stop the User from moving them inadvertently when painting). Paint anywhere on the Canvas. Delete the Sprites via a loop through the List - fail:
    Snap1
1 Like

How are you disabling the sprites (there is no enabled property for a real sprite), but you can use the enabled property with the dynamic settings?

You can make the Sprite Property settings available by having a single hidden on-dynamic sprite on the Canvas.

Since reporting the bug, I can't reproduce it with unchanged code!

Snap2

Sorry ignore me, just spotted the enabled checkbox :upside_down_face:

You do not need a hidden real sprite, you can just use the component setter:

image

I too cannot reproduce your reported problem

.... I'm not using CompCreator to set the property - maybe that is why my code failed.

Edit.... but then that can't be 'it' since the dynamic sprite has to work with all the regular sprite functions such as drag - and does so perfectly.

Well, I had tested this over and over as I tried to find a work-around before reporting it, but since reporting it, there has been no issue at all :zipper_mouth_face:

false alarm :rofl:

It occurred for over an hour, but it hasn't occurred since. Can't be deemed as a false alarm as we don't know why it started or why it stopped.

fixed, please update the extension.

I did the same, but got no error.

2 Likes

Same for me, but in the process found a lot of weakness in AI2's sprites :grin:

is this extension still available? the download link seems unavailable. es there a mirror for downloading? thx in advance

The link is here, in the first post:

image

https://kevinkun.cn/compcreator/

14 posts were split to a new topic: Got this error "java.lang.RuntimeException: no such class" when import extension

Children will only get children of dynamically created components?

good question.
I will make an update tomorrow.

update
v8.4 Children and Parent method can used for non-dynamic components.

known issue:
Children list of Screen in companion is not corrent, but no problem when in apk.

1 Like

@Kevinkun

Hi Kevin,

I discovered another issue with your extension.
If I dynamically create TextBoxes with 'Width' set to 'fill parent', it does not do that.

I made a test project to demonstrate this.
The top part is created with your extension and the bottom part is made by hand.

Knipsel

As you can see, the bottom part textboxes nicely fill the gap and the top part does not.
As soon as I enter enough text in the dynamically created textboxes, they will stay at their max width though.

Here is the test aia file so that you can debug easily:
CompCreator_Test.aia (33.7 KB)

I hope that you can find a fix for this issue.

Many thanks in advance!

Working OK here:

image

and copying your ha:

image

1 Like