[F/OS] - Dynamic Components Extension (for every component) 2.3.0


It normally generates the result, but this error occurs and ends up crashing. Please help me with this. I need only the items in this list to be visible, and not all items in the list, so I created a list just for the selected items.

1 Like

Version 2.3.0

I know it has been a long while since the last release, as there were not that huge changes to create a new release for, but during the past months the extension became the more polished, so I wanted to release a new version and here it is.

Hopefully this release should be the last one since the extension now can be considered “completed/final” as it already serves its purpose (to create components dynamically) and I don’t want to make it more bloated and harder-to-use. Also, considering the extension is now around for almost more than 4 years, it had to come to an end sooner or later. I of course plan to fix bugs whenever it is encountered even after this release, but please note that it is possible that there may be long periods of time between new releases unless there are critical issues as I have a personal life like everyone else here.

:star: New

  • Added CreateEphemeral block to create & return the component directly without assigning to an ID.
    method_createephemeral

  • Added RemoveComponent block to remove components from screen instead of requiring its ID as in existing “Remove” block. Compared to existing “Remove” block, this block can also remove non-dynamic components.
    method_removecomponent

  • Added ReplaceId block (pull request #47) to just change the old ID with a new ID, unlike “ChangeId”, it doesn’t change the part of ID among all IDs.
    component_method

Most of you probably already know it, but for those who don’t, there is now a web-based tool that replaces the old TemplateCreator Python tool to create schemas from existing AIA projects in a few clicks in your browser directly.

:white_check_mark: Fixed

  • Fixed the issue where canvas elements (Ball, ImageSprite, Sprite) doesn’t work properly after being created. (pull request #66)
  • GetComponent and GetId now returns an empty string if the component has not found instead of returning*nothing*. (pull request #49)

:arrows_counterclockwise: Improved

  • Template names (name key) are no longer mandatory to set.
  • Schema block is now more reliable than ever, as it no longer manipulates the whole template to replace template keys.
  • Block and error descriptions are now more detailed, which hopefully should cause fewer confusions for common mistakes.
  • Some other internal/background changes to make the extension more efficient and make it easy to examine the code.

:x: Removed

  • Removed already deprecated blocks from older releases. No need to change anything if you are already not using any of the deprecated blocks.

Looking for downloads?
:arrow_up: Click to jump to the first post

9 Likes

Thanks for the update :+1:
Is it possible to create Android widget view or any custom view using it’s package name?
Like:

  1. android.widget.RatingBar
  2. com.myview.CustomView
2 Likes

Short answer; you can only create App Inventor components, which means built-in components + extensions (because extensions are also an App Inventor component)

Long answer;

Full package names are supported, but you can’t create Android widgets by it because the extension creates instances of classes that gets an com.google.appinventor.components.runtime.ComponentContainer object in its constructor, which in simpler terms, it will only work for App Inventor’s own components and every other class (such as extensions) that implements an App Inventor Component.

Even if you could create Android widgets, App Inventor defines its own components, so App Inventor doesn’t directly expose the underneath Android widget to the user, and since blocks look for a valid App Inventor component, I don’t think you will be able to do anything useful with Android widgets by just using blocks.

If you want to do stuff with Android widgets, you should develop a new extension or a built-in component.

1 Like

This is the best extension that I still use from your first release. Thanks again :smiling_face_with_three_hearts:

4 Likes

Thanks Again @yusufcihan

Kindly permit me to use this extension for the MIT GLOBAL AI HACKATHON