You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-21Lines changed: 39 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,10 @@
1
-

1
+
# <imgsrc="src/com/yusufcihan/DynamicComponents/aiwebres/icon.png"height="28"> Dynamic Components for AI2
2
2
3
-
# DynamicComponents-AI2 `Extension`
3
+
An extension for [MIT App Inventor 2](https://appinventor.mit.edu/) applications that allows to create components dynamically by its name at runtime with blocks.
It is based on Java's reflection feature, so this allows us to create instances of classes (components) by its name. Also, unlike other extensions that create components in runtime, this extension doesn't keep a list of all component names because it supports every component which is ever added to your App Inventor distribution by nature. So, not only can you dynamically create common components like `Button`, but you can also create `DatePicker` components.
Fully supported Dynamic Components extension for MIT App Inventor 2. It is based on Java's reflection feature, so it creates the components by searching for a class by just typing its name. So it doesn't have a limited support for specific components, because it supports every component which is ever added to your App Inventor distribution!
10
-
11
-
So if you use Kodular, you will able to create all Kodular components, if you use App Inventor, you will able to create all App Inventor components and so on. Extension components are supported too!
12
-
13
-
> ⚠ The `beta` branch will be reset after every release. So stay on the `main` branch if you don't know what you do.
14
-
15
-
---
16
-
17
-
### Asynchronous support
18
-
19
-
This extension can create components asynchronously or synchronously based on your choice. If you don't want to block the main app during creating a bunch of components, go to the Designer (after importing the extension) and select between "UI" (asynchronous) and "Main" (synchronous).
So if you use Kodular, you will able to create all Kodular components, if you use App Inventor, you will able to create all App Inventor components and so on. Creating instances of other extensions are also supported.
22
8
23
9
## 🧩 Blocks
24
10
@@ -49,7 +35,7 @@ This extension can create components asynchronously or synchronously based on yo
49
35
</table>
50
36
</td>-->
51
37
<td>
52
-
Creates a new dynamic component. It supports all component that added to your current AI2 distribution.
38
+
Creates a new dynamic component. It supports all component that added to your current AI2 distribution. Note that you can't create components in Screen directly, you will need to have an arrangement beforehand inside a Screen to do that.
53
39
<code>componentName</code> parameter can have these values:
54
40
<br><br>
55
41
<table>
@@ -68,6 +54,15 @@ This extension can create components asynchronously or synchronously based on yo
Creates a new dynamic component in given container (arrangement/canvas) and return it without saving it to the created components list, so it won't be attached to an ID. Note that you can't create components in Screen directly, you will need to have an arrangement beforehand inside a Screen to do that.
64
+
</td>
65
+
</tr>
71
66
<!-- CHANGE ID -->
72
67
<tr>
73
68
<td align="right">
@@ -131,7 +126,16 @@ This extension can create components asynchronously or synchronously based on yo
131
126
</table>
132
127
</td>-->
133
128
<td>
134
-
Removes the component with specified ID from screen/layout and the component list. So you will able to use its ID again as it will be deleted.
129
+
Removes the component with specified ID from screen and the component list. So you will able to use its ID again as it will be deleted.
Removes a component from the screen. It doesn't need to be created by this extension. But if the given component is dynamically created by this extension, this block will also de-register its ID so its ID can be reused for other components that are going to be created later.
135
139
</td>
136
140
</tr>
137
141
<!-- SET PROPERTY -->
@@ -431,14 +435,28 @@ This extension can create components asynchronously or synchronously based on yo
431
435
</tr>
432
436
</table>
433
437
438
+
### Asynchronous support
439
+
440
+
This extension can create components asynchronously or synchronously based on your choice. If you don't want to block the main app during creating a bunch of components, go to the Designer (after importing the extension) and select between "UI" (asynchronous) and "Main" (synchronous).
0 commit comments