[FREE] šŸ”„ AllComp Extension: Get All Components using blocks

AllComp

Hello everyone, while making one of my apps I got strangled in an unusual issue, I wasn't able to get the list of all the label components in a screen using blocks. Moreover in certain extensions to change the font of all labels you have to place them manually in the blocks. So I created this masterpiece.
An extension to fetch the components in the code dynamically.


Methods:

GetAllLabelComponents


Returns a list of all Label component objects on the screen.

Return Type: list


GetAllLabels


Returns a list of all Label component names on the screen.

Return Type: list


GetLabelComponentsByNameSubstring


Returns a list of Label component objects that contain the specified string in their names.

Parameter Type
substring text

Return Type: list


GetAllButtonComponents


Returns a list of all Button component objects on the screen.

Return Type: list


GetAllButtons


Returns a list of all Button component names on the screen.

Return Type: list


GetButtonComponentsByNameSubstring


Returns a list of Button component objects that contain the specified string in their names.

Parameter Type
substring text

Return Type: list


GetAllTextBoxComponents


Returns a list of all TextBox component objects on the screen.

Return Type: list


GetAllTextBoxes

Returns a list of all TextBox component names on the screen.

Return Type: list


GetTextBoxComponentsByNameSubstring


Returns a list of TextBox component objects that contain the specified string in their names.

Parameter Type
substring text

Return Type: list


GetAllImageComponents


Returns a list of all Image component objects on the screen.

Return Type: list


GetAllImages


Returns a list of all Image component names on the screen.

Return Type: list


GetImageComponentsByNameSubstring


Returns a list of Image component objects that contain the specified string in their names.

Parameter Type
substring text

Return Type: list


GetAllCheckBoxComponents


Returns a list of all CheckBox component objects on the screen.

Return Type: list


GetAllCheckBoxes

'
Returns a list of all CheckBox component names on the screen.

Return Type: list


GetCheckBoxComponentsByNameSubstring


Returns a list of CheckBox component objects that contain the specified string in their names.

Parameter Type
substring text

Return Type: list


GetAllSliderComponents


Returns a list of all Slider component objects on the screen.

Return Type: list


GetAllSliders


Returns a list of all Slider component names on the screen.

Return Type: list


GetSliderComponentsByNameSubstring


Returns a list of Slider component objects that contain the specified string in their names.

Parameter Type
substring text

Return Type: list


GetComponentByName


Returns a component by its name.

Parameter Type
name text

Return Type: component


Support me

I am an independent developer constantly releasing such useful extensions to help the community. It will make my day if you could fund the extension here by clicking the link below


Download the extension

:fire: io.allcomp.aix (6.1 KB)


Subscribe for tutorials and more


I would be happy if you can test my extension and give me feedback on the same
It is a completely unique extension on the community and useful to format labels and other components in bulk.
Each component has three methods

  1. Get All Components: It returns the list of component objects
  2. Get All: It returns list of component names
  3. Get All by substring: It returns a list of component objects with the substring
    Also if you can remove the previous messages in this post it will look less cluttered

I understand that some of you might not be able to get the usage of the extension
Example if I have to get a list of buttons that contain the substring button

This will apply formatting to these buttons that contain the string button

image

Hope its clear now

Credits

@Kumaraswamy for helping me out on how to get the components using MIT AI2's library. Though I had made the extension beforehand, I was stuck while compiling as I was using the wrong Method name :joy: So silly!


Regards
Sarthak Gupta

3 Likes

only this one is useful, but not necessary. others can be done with build-in blocks.

2 Likes

I don't think so

Imagine if you have twenty labels named as kevin1 kevin2 and label1 label2
You have to apply formatting to kevin1 and kevin2 you can use the block to get label comp list with substring kevin
Believe normal blocks can't do this

1 Like

This is very great

Its so beneficial imagine you have labels with different names headings sub paragraph 1234 etc.
Now you have to apply formatting you can apply similar formatting to heading by entering substring

1 Like

Suggestion, could you reduce your number of blocks by supplying helper blocks for the component type, or to simply allow a text block to define the component?

1 Like

@TIMAI2 thanks for your suggestion I am thinking to further increase the number of components and create a string input for component type
But first please list this version

[mod edit: content added to first post, where it should be.]

I don't think it's a good idea to tag moderators or power users unless explicitly told by them to do so...

3 Likes

Thanks brother

How they both are different?

What is the usage of it and what is substring in the label?

I request you to make a useful guide and add in this post, I don't get the usage of the extension and how to use this extension?

Why these above are not useful? What is the difference between yours and these.

See here

How that list formed to be a object and become view component?

1 Like

Please be clear

What is the main use of this extension?
Where it can be use?
How this is different from our blocks I shared?

Get all label gives list of all label names
Whereas the other gives label object in list so you can use it in other extensions for formatting
The third one lets you get component list that have a particular string in a list
Eg heading will return list of labels heading1 headingnow etc
Hope its clear now

For eg you can use the button block to format specific buttons

You can use my extension to get a selected list of buttons by a string

Then show a guide