Arithmetic operations app

Hello i am new here using kodika and i’m trying to create my first app it will be a school proyect so i am running out of time.
What i am trying to do is that the app get the values from two text views and send the result on a label if anyone could help me i would be so glad because right now i don’t know how to use the block codes.

Hello,
Firstly you will need to enable the Visible In Code option in both the Text Fields and Label.
Also, in my example, I renamed TextFields to Text Field 1 and Text Field 2 and the Label to Result Label.
You can change the Visible In Code and Display name from the Code Section on the Styles Inspector (4th tab) .
image

Then you will need to go to Code mode and add a new Function. I named it add and here is its implementation. You can find all the blocks using the Search. In addition, you will find the blocks for the Design elements in Blocks -> Design -> Visible In Code. You can also look in the Math category to add the Math blocks and in Recommended Functions.

After you have created the function, you will need to execute the function when the button is pressed so you need to go back to the Design

  1. Select the button
  2. Select the Third Tab which is the Actions Tab.
  3. Press the new Action + on the On Click.
  4. Select Execute a Function.
  5. Select your function, called add, or any other name that you maybe used.

Now you should be ready to run the application.

1 Like

Thank you so much!!! It worked well and I am so grateful what a great forum and attention to the users!!!