How do I implement the following:
A label called currency, an input field, a checkbox for up and a check box for down, and a calculated field.
I then want to input a value, check either up or down checkbox and based on the selected checkbox I want to add (if up selected) 0.00112 to the entered value or -0.00112(if down is selected)
I know it's a lot to ask but if someone could then maybe point me in the right direction.
Thanks in advance.
A simple calculation
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
A simple calculation
- Attachments
-
- SimpleCalculation.livecode.zip
- (958 Bytes) Downloaded 142 times
Re: A simple calculation
Hi AQLIVE,
1. welcome to the forum!
2. I highly recommend to take a look at these stack to get the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
3. Please take a look that the attached stack, should do what wou want.
I commented all scripts, so please take deep look!
Best
Klaus
1. welcome to the forum!

2. I highly recommend to take a look at these stack to get the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
3. Please take a look that the attached stack, should do what wou want.
I commented all scripts, so please take deep look!
Best
Klaus
- Attachments
-
- calculation1.livecode.zip
- (2.16 KiB) Downloaded 140 times
Re: A simple calculation
Hi Klaus and thanks you sooooooo much for that detailed explanation of how to do that simple calculation.
That really helped me alot.
I thought functions (the calculation function) should be written in the stack and not in the button.
But this makes it much simpler. Thanks a million
It it possible then to make somekind of executable / program file from that piece of code so that I can just start the calculation program instead of live code every time?
That really helped me alot.
I thought functions (the calculation function) should be written in the stack and not in the button.
But this makes it much simpler. Thanks a million

It it possible then to make somekind of executable / program file from that piece of code so that I can just start the calculation program instead of live code every time?
Re: A simple calculation
Hi AQLIVE;
In Livecode go to menu "Help" and select "User Guide".
Then a PDF should open and in the PDF look for chapter: 9.1 Building a Standalone Application
That will tell you what to do
Best
Klaus
"Commonly used" should of course go into the stack or card script, but this was just a quick exampleAQLIVE wrote:I thought functions (the calculation function) should be written in the stack and not in the button.
But this makes it much simpler. Thanks a million

Sure it is!AQLIVE wrote:It it possible then to make somekind of executable / program file from that piece of code ...

In Livecode go to menu "Help" and select "User Guide".
Then a PDF should open and in the PDF look for chapter: 9.1 Building a Standalone Application
That will tell you what to do

Best
Klaus