Welcome

SuaveApps.com is the home of developing iOS developer Jonathan Hirz. Check the links above to seen his dev blog, his apps currently available in the App Store, and other useful information that has been collected here over the years. To the right is the archive of old blog posts.

Saturday, April 9, 2011

Calculator done, with a small problem

I finished all of the additions in the first 'Calculator' assignment. It consisted of adding a few buttons with new functions for the calculator, and some memory management buttons which needed new variables too. Adding floating point was the last thing I did, and it is almost working as expected. It was easy to allow the user to add decimal points (add a digit button with a '.' on it), took some thought to keep the user from entering more than one decimal per number, but now I am stuck on one situation. When the user is adding two decimals together (0.2 + 0.3), the second entry isn't allowed because of the way I check in digitPressed. Watch this video:


I want to move on, but think that I should figure out a solution to this before jumping in further. This is one thing that sucks about taking the class through iTunesU, you don't have any TAs or teachers to answer your questions or help you figure something out. All I have is Reddit. :)