iPhone Calculator App

Discussion in 'Jailbreaks and iOS Hacks' started by DrMoray, Jun 29, 2007.

  1. DrMoray macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #1
    According to this ThinkSecret image (on right), the calculator in iPhone will be pretty lame.

    Here's one that I've been working on. I posted an earlier version elsewhere, but it's been updated quite a bit. It still needs some prettying up, but it's getting close.

    However, I'd love some feedback, especially from someone with an actual iPhone. It's meant to be used in landscape mode.

    I can't figure out if the "mouseover" event will show up when an iPhone user "taps" the buttons or if i need to implement something else.

    Thanks for looking.
     
  2. Mathartguy macrumors newbie

    Joined:
    Jul 1, 2007
    #2
    Better calculator

    It seems to work fine on my iPhone, but I have the same problem there that I have in Safari on my iMac; namely, the labels of the keys appear white and the keys appear a very light gray, so it's almost impossible to read them.

    Also, the size as it pulls up is too small, so I had to enlarge it. It would be convenient if it initially came up approximately twice as large.

    Another suggestion – Make the url shorter, so it's easier to type it in using the iPhone keypad.

    It's something I would definitely use, though. Thanks!
     
  3. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #3
    Thanks for checking it out. I'll do something with the url shortly. But could you try something for me? It sounds like you've got an old version of the stylesheet. Could you do a refresh once on the page?

    If that doesn't fix the problem, would you mind posting a screen shot?

    The intent is to have the keys change from black background, light text to light background, black text on mouseover (or hopefully a tap on the iphone as a sort of visual clue that you've tapped that key).

    Is that what you are seeing?

    Thanks again.
     
  4. Mathartguy macrumors newbie

    Joined:
    Jul 1, 2007
    #4
    Mouseover

    I refreshed the page and got the same problem. On mouseover, the text on the keys changes from white to black. However, the keys themselves are always light gray.

    On my iMac, the black reverts to white as soon as you move off the key. On an iPhone, you wouldn't be able to see such a transient change because your finger would be blocking your view.
     

    Attached Files:

  5. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #5
    Ewww, ugly. That's not what I'm seeing. I'll find out why and post an update.

    MiniCalc is linked from the iPhav.com homepage, so quicker access to the calculator from an iPhone could be:
    1 - type "iphav.com" in the address bar
    2 - tap "MiniCalc" link

    Thanks!
     
  6. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #7
    I updated the styles to remove the "hover" (mouseover) and the changing background color.

    Let me know if that helps.
     
  7. Mathartguy macrumors newbie

    Joined:
    Jul 1, 2007
    #8
    Mouseover feature

    It looks the same, but the type no longer turns black on mouseover.
     
  8. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #9
    I found and fixed the problem. For whatever reason Safari 3.0.2 it was hiding it from me. Same thing in Web Kit nightly download and in the windows Safari version as well. And IE6, and ....

    well you get the point. Thanks again for helping me find it. I'll be adding more features soon. Please let me know of any other suggestions.
     
  9. Mathartguy macrumors newbie

    Joined:
    Jul 1, 2007
    #10
    Scientific calculator

    It looks much better. There seem to be some other bugs, though.

    One is the use of pi. Multiplying pix2 works, e.g., but 2xpi doesn't.

    There is also a problem with some results from trig functions showing up low and cut off. E.g., hit "2" "cos".

    For additional features, I would like to see a Degrees mode, not just Radians.

    Thanks!
     
  10. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #11
    Fixed the issue with multiplying Pi.

    Also widened the display to prevent the wrapping of long digits.

    I should have degrees working by early next week.
     
  11. Mathartguy macrumors newbie

    Joined:
    Jul 1, 2007
    #12
    Scientific calculator

    Thanks for making the fixes.

    Another suggestion would be to somehow make large numbers more readable. E.g., 100,000,000 reads "100000000". Adding commas would help. An alternative is to make scientific notation an option, so numbers are always displayed with an exponent, not just really big numbers. The approach on my old hp calculator is nice, where scientific or fixed notation can be selected along with the number of digits. E.g. "Fix 3" would mean non-exponential notation, with three digits displayed after the decimal point.
     
  12. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #13
    Yeah - that makes sense. I'll look at it when I get a bit more functionality built in.
     
  13. eagle33199 macrumors member

    Joined:
    Mar 13, 2007
    #14
    I haven't had a chance to test this out fully yet, but i think mouseover might work... I've noticed on a number of sites that if i put my finger on a link and hold it down i'll get a pop up thingy. For others, try going to http://www.mactech.com/commapplenewsforiphone.php and click and hold on one of the titles. You'll see what i mean...
     
  14. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #15
    I'm hoping to check out a "real" iphone this week. Apple posted their iPhone development docs here, which states that iPhone safari doesn't support mouseover or hover styles. So I'll have to come up with something clever to give visual feed back to the taps on each key.
     
  15. scotty1024 macrumors newbie

    Joined:
    Jun 30, 2007
    #16
    Don't forget about OnClick() ... I'm pretty sure that is what you are seeing in action.
     
  16. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #17
    I fixed a couple of errors today with MiniCalc. The decimal point wasn't working correctly (and does now). x! when x was 0 was returning 0, it now returns 1 as it should.

    Thanks to all who have looked and given suggestions. I'll be updating it frequently.
     
  17. Andru macrumors newbie

    Joined:
    Jul 14, 2007
    #18
    JoeHewitt.com's iPhone UI

    Hi,

    You should go over there and pick up the iUI javascript library. This should give your sciCalc a true iPhone look and feel.
     
  18. DrMoray thread starter macrumors member

    Joined:
    Jun 20, 2007
    Location:
    North Carolina
    #19
    I just added some better styling to MiniCalc, my iPhone Calculator. I still have to add more functionality, but its progressing, albeit slowly. Let me know what you think.
     

Share This Page