hey, im new to corona but i have the hang of it(mainly from tutorials) and i have to make a calculator app for a school project. I just need some pointers and an explanation on how to do it. im using textWrangler
[import]uid: 90579 topic_id: 16777 reply_id: 316777[/import]
first: please don’t double post.
as for your question: write some functions that cover the particular calculations
function doPlus (num1, num2)
local theResult = num1 + num2
return theResult
end
function doMinus (num1, num2)
local theResult = num1 - num2
return theResult
end
…and so on.
then create a numpad by using the widget api.
when a number is pressed, store the input.
when + - * or / is pressed, store the calculation method as well
when = is pressed, call one of the calc-functions …
hope that helps, at least to get started.
-finefin [import]uid: 70635 topic_id: 16777 reply_id: 62823[/import]