Some Improvements

Hello! Kodular is amazing, but it can be even better.
I leave you 3 suggestions, and I would like to know if the community would also like to have these improvements:

1 - It would be great to be able to group some controls, for example the radio buttons, which are usually used as a selection of options (if I check one, the others in the same group are unchecked, for example). Something similar could be done with other controls.

2 - In the blocks section it would help to have some way of grouping blocks, perhaps with tabs, or at least being able to draw a rectangle on the background … Being such a “visual” system, when there are many blocks it is difficult to follow the workflow

3 - I really miss a block that does the javascript Switch statment function, or VB select case. Yes, I can always cascade “if” commands, but having the switch block would be beautiful

These are just 3 suggestions, or rather, wishes. Your work is already great and I am very grateful for it!

People will not vote if at least one thing is not in their opinion. Please make a poll with three points. Thx.

Yoshi

1 Like

I don’t think the first suggestion is really necessary, but nothing agains it. And I don’t even understand the third.

But your second suggestion is amazing. One of the biggest problems of a builder like kodular is that bigger projects become really difficult to edit. If the computer is slow the website will be very, very slow, and even if it is a super computer it will be very difficult to find the blocks, variables, etc.
What I usually do is to create imaginary columns. At the first I add visible components by the order they appear. At the second I add initialize screen and back button click, among a few others blocks. At the second I add all the procedures used at my project. And them I add a column for each component. Example: A column for firebase, other for yandex, other for tinywebdb, etc. But even with this system I have problems to do what I have to.
Something like a tab system, that could be enabled or disabled would be really amazing and would certainly make the website load very faster too.
The only trick I know to make it work better right now is by collapsing some blocks but it becomes a problem when I have to work in the app again after a few weeks or months.

2 Likes

It is not an opinion poll. I only find it interesting to know the opinion of other users, without being a survey. But neither is the idea to discuss that, which is not the center of the post. Anyway, thanks for your comment.

Yes, I agree that the second is the most interesting of the suggestions (they are not in order).

The first arises when you want to analyze the behavior of a group of controls as if they were one. For example (it’s just an example), suppose you have a group of radio buttons to select if you prefer to eat pasta, meat, salads or desserts. And on the same screen you have another group to select if you prefer to drink wine, soda or juice. Currently you should implement some function that turns off the remaining options when you choose one, and also that assigns a value to a variable so you know which option you chose. And you should do it twice, because you have two sets of options. But imagine you create a group called “meals” with four radio buttons, where only one can be checked. And another group called “drinks” with three options and the same characteristics. Then you check its “index” or “selected” property or whatever, and you know which option is checked. Something like this saves a lot of blocks, and some variables.

The third would be useful when you must take action according to, for example, the different values ​​of a variable, which is something that usually happens. Can it be done in another way? Yes of course, but using many more blocks than if that option existed.
(“If x = 0, then do this … else, if x = 1, then do this … else, if x = 2, then do this other” … so it works now. Compare with the Switch statement javascript: Switch statement)

None of the three suggestions are essential, but they make the programming experience simpler and more comfortable. In fact, many languages ​​have those options.

1 Like

I also find Option2 very interesting.
Especially with larger projects, you quickly lose track of things. This is particularly funny if you want to make a change again after months.
A possible approach would be, for example, if you select an object with the right mouse button in the block structure tree on the left side. And then you could select “Show dependencies”. Then all objects that are not within this structure are grayed out or hidden.
What do you think about that ?
Franz

3 Likes
  1. Not necessary…
  2. Good Idea but already asked
  3. I don’t understand properly

I think he means in Option 3 the switch case operator is faster to code and easier to read and understand than a complex if elseif else statement.

ooooh yes, of course. I have always missed the switch option at kodular too. I never understood why it was not implemented since day 01 of app inventor to be honest.

1 Like

The first one (grouping radio buttons) you can create it yourself by using procedures and/or the ANY components blocks.

2 Likes

Create the decision command in Switch blocks (several languages ​​have them) or Do Case Enddo (does the same thing as the previous command - Visual Fox Pro)
The switch command does the same thing …
Example:
variable = 1
Do case
case variable=1
…
case variable = 2
…
enddo
hahahahah :laughing: :grin: :smile: :smiley: :grinning: in Visual Fox Pro we don’t have to put it; at the end of the lines, neither declare variable and the variable receives any kind of value at any time in the program …
x = 1
y = x +2
x = “banana”
? x
y = “Brasil”
w=y+"-"+x
? w
x = true
if x
…
endif
And follow the game … No syntax error …

1 Like

Of course, also with a machine language or an assembly language it is possible to do very complex things … my suggestions are intended to simplify programming with kodular. Being able to have blocks that do the usual things in a few steps

1 Like

What? :flushed:

I’m talking about doing it with the normal Kodular blocks, you don’t need an extension for everything. Some things are perfectly doable with a little ingenuity.

Sure, I understand you perfectly. What I mean is that there are commands and instructions that simplify things. For example, the “for each” statement. I assure you that the same function can be performed with other blocks … using “if” statements and variables. But that block saves you a lot of steps. With my comment I meant that if programmers historically thought that it is not worth implementing something because it can already be done with what there is, machine language would still be used, and, of course, kodular would not exist

1 Like

Ok. Let’s say the requests are placed. Now you have 2 options: You can 1. sit and wait until someone decides to implement what you need which can take days, months or years, or 2. you can try to do it with what you have and know how to use (blocks).
I usually do the second option.

I choose option 2 while I wait patiently for the suggested option to be implemented one day (maybe). Maybe my next project can be done with more powerful functions

1 Like