Mathematics possible?

Hi

I’m new to this great software and i wonder if i could use it to do mathematics ?

For instance, I have two textfields where i input 2 digits, 1 button that says calculate and a textfield where i want the answer
to be textfield1+textfield2

Do i use scripts for this or is there an easier way ?

Best regards

AM

You can use Action with simple JS script:

function () {
    return Number(document.childByName("a").content.text) + Number(document.childByName("b").content.text)
}

See the attached example math.pma (519.5 KB)

Hi
Thank you alot for the help, it worked like a charm !!
Have you ever thinked of including mathematics like an action ? It think it would do alot to your already great software.

Another question not related to this one…

How do i use the mobile specific sensors like, compass, proximity, nfc and so on ?

Best Regards

AM

You can receive sensor data on mobile device using actions.

  1. Enable required sensor in Project Inspector on Sensor tab:

  2. Display acceleration along the X:

See the example get_sensor_data.pma (157.0 KB)


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.