[Free] CompCreator - create component dynamically

You need a list.

When a button is created in CompCreator, you need to save that button to the list. They will be in order, so you can then ascertain which button was clicked

Could you help me how to do that?

Like so:

Use the when ANY button clicked event and your list to capture button clicks

Thanks I going to try it

Yes it worked. Thank you, this helpd me a lot.

2 Likes

One example added for ChatView.
compCreator_ChatView_CloudDB.aia (214.0 KB)

features:

  1. real time group chat, with cardview;
  2. Can send texts, images, and audios;
  3. scroll down automaticly.

Extensions used:
ImageConverter by @TIMAI2 (to compress an image)
Enhance by myself (for cardview)
Base64Util by myself (to change image/audio to base64 string)
VerticalScollHandler by @ColinTree (arrangement auto scroll)
EasyDialog by @Zhangzqs (to zoom an image when clicked)
GetApiLevel by @Anke (when asking permissions)
Thanks.

3 Likes

It seems in the visibleComponents dropdown list the Table properties columns and rows is missing. I am using text blocks for this at this time.

How would one handle creating dynamic components that are repeated? Your Create component uses a global variable to attach to what is created. If I created my structure many times how does one handle that global variable for a newly created structure?

In your example you create a vertical arrangement and assign it to global var outerVA which is attached to a button click. Do I increment outerVA if I want to create another one?

You answered someone else here who was having trouble with unique IDs and you suggested he use CompCreator. I'm just wondering how CompCreator handles that without using unique IDs.

there are many examples for this extension.
what kind of structure you want to build?
Normally you can refer to some component in ANY COMPONENT event, or you can save the new component in a LIST or DICTIONARY.

TableArrangement is buggy, better not to use it. you can build your table with arrangement in arrangement.

The previous project was normal, but there were issues with the new project.(以前的项目正常,新项目出问题。)

8.8 and 8.9
AI伴侣出现错误: java.util.Collections$UnmodifiableRandomAccessList cannot be cast to java.util.ArrayList

show your blocks, did you use other extensions?
since i did not use this java.util.Collections in the source code.

code54a,2.75u,8.8,8.9

Not playing the error now,
Newly created, no other blocks, placed on screen, AI companion not displayed. Deleting is normal.

现在不弹错误,
新建的,无其他blocks,放入屏幕,AI伴侣无显示。删除就正常。

新项目,切换项目后,要重新连接,就正常了。
在另一个项目,AI伴侣报错。重新连接也不行。
For a new project, after switching projects, it is normal to reconnect.
In another project, the AI companion reported an error. Reconnecting is also not possible.


2

这个是其他扩展引起的。CompCreator 没有用这个包

My guess would be EnhancedDB - you can just use tinydb. Remove/replace and see what happens.

Identify the cause

Layout ## AbsoluteArrangement and CompCreator conflict

绝对布局与CompCreator扩展冲突。

Layout AbsoluteArrangement and CompCreator conflict

1 Like

ok, will have a look later.

Confirmed, simply existing together causes runtime error in companion.

compAndAbsolute.aia (34.6 KB)

fixed with v8.10

1 Like