Dynamic Components (Creating a reply section similar to Facebook)

I want to be able to create a replies section using Dynamic Components. Although my problem is how to link and id of one dynamic component to another. For example, I created a reply button with the id of 1 and an arrangement for the post with the id of 101. How do I make it so that the reply button with the id of 1 will always create labels or replies within the arrangement for the actual post with id of 101. I also want to know how to make it loop for example the id 2 is equal to 102 the id 3 is equal to 103 and so on.

If you use dynamic components, won't your App eventually fill it's allocated memory and crash?

What do you mean by that?

In such case you need to use two dynamic component s.. one for main layout and another for creating reply section within main layout.

If the main layout was created va1 in visa then reply section should create in label/button/any component in main layout of va1

Or you could use with just single dynamic component just by creating a textbox in va1

Using too many dynamic components can fill up the device memory and the app may crash.

Cuz, too many dynamic components produce too much lag. A better way is to store the messages in a webpage running through a WebViewer, as

  1. Messages are always sent and received through web, so, you already have to use an Internet Connection to access them.

  2. It will reduce code by too many blocks.

Disadvantage : You have to learn programming webpages and databases. This is essential if you want to create complex projects like this.


Option 2.

Make an extension of your own, which already defines everything, then just take input of some parameters to add components.

Directly using blocks in AppInventor will lead to creation of too many blocks, even if you use procedures to do such things. It will produce too much lag in the viewer.


SHUBHAMR69

1 Like