[Free] CompCreator - create component dynamically

@TIMAI2 fixed, please download again.

1 Like

Can you give me a video tutorial how to create the component and then return it? Your explanation is great, but i still can't understand it

pls check the first post EXAMPLE part, there are several examples.

or tell us what do you want to make/achieve?

So like i said, i would like to create a component and then get all of if it to store in firebase. But i can't quite understand how to use the blocks. I've use dynamic extensions from yusufcihan and able to create new component everytime i click a button. But, i still can't understand how the block works in your extensions.
I'm new to MIT App Inventor, so do you mind just give me the video tutorial or just give an simple example of how the blocks works? I mean if i use the create block, i have to filled the 'component' section and 'in' section with what?

Then you need to read post 1 of this thread carefully, and study the examples first.

Socket "in" need a container component, this also mentioned in first post.

I found a bug that does not support the EmailPicker component in the new version (haven't tested the old version yet). When I do use it, this happens.

When I remove that, everything works perfectly fine.

image

With version 7.0 everything works fine with the EmailPicker component.

image

1 Like

Does it still fail if you do not use a template ?

It doesn't fail anymore.

When / how / where ?

image

image

1 Like

OK, so is it the template version causing the problem ?

Sorry, I thought you mean the older version. No, it doesn't - there isn't even the option in there.

These are all of the options available. The text block would not plug in into the "component" socket.

@kevinkun may have missed it out

looks like EmailPicker is missing in the options list, need to added in next update.

1 Like

V8.2

  1. Add missing components in options list, (like EmailPicker, ContactPicker, ImagePicker, PhoneNumberPicker)
  2. CreateWith (template) block now return an Object (outest container). this will help to get the child component with Children block.

@gordonlu310 @TIMAI2

3 Likes

Hi,

I'm using this wonderful extension.
I make my main app in pieces by first making that piece in a test app.

I use CompCreator to make a list of checkboxes and then a listener to see which checkbox has been tapped to update the data.

Using this CompCreator works fine in my test app, both in the emulator and on my tablet.
But as soon as I use it in my main app, whenever I tap a checkbox (CompCreator1.OnClick), the app crashes.

See the blocks concerned:

When I empty the "procedureCheckboxClicked" procedure, it's ok.
But as soon as I put something in that procedure, even as little as a label, the app crashes as soon as I tap a checkbox.

This is driving me crazy!
I can't test the main app in the emulator because it has no data to work with, and putting data in is not an option since it is too much.

Does anybody have an idea what can cause this?
Is there a way to retrieve error logs on the tablet (samsung)
I have tried the ScreenErrorOccurred write to a file, but it does not trigger.

CheckboxClicked procedure needs two parameter, the second is id, but you feed him a component, is that the reason?

ps
this Onclick method is designed for the components with no click event like layout or label.
For Checkbox, I suggest you use native Onchange event of any Checkbox.

Thanks Kevin,
But it works just fine in de test app.
And I feed it 2 parameter as you can see in my blocks above.
Since those checkboxes are inside horizontal arrangements I also tried those in the onclick event but same result, it crashes.

Anyway, how can I use the onchange event since I generate them dynamically and so cannot pull the block from the list on the left?

possible to pm me the aia?

for any checkbox.onchange event, you need to add a checkbox manually, drag out the block, then hide or delete the checkbox.

I could pm you the test app, but that one works. The main app is for a client so unfortunately I can't send you that.

The main app is rather heavy, maybe it has something to do with that?
Dragging out a block!? Won't that block be deleted when I delete the checkbox?