My Calculator App[

googolplex

jeff.hume.ca
Hey,
I'm working on a Calculator program for practicing Cocoa. It isn't complete and some things are a little messed up, but I'd love if you guys could download it and give me some feedback. As of now the trig functions give answers in Radians, I will make it an option. I will also add more functions to it in time and the interface will change some.

You can get it here: http://homepage.mac.com/jeffhume/Calcex.app.sit

:)
 
Looks alrighty so far. Just a couple things:
1. Is it just me, or do the trig functions seem to take a while to evaluate? I can mash the square root key over and over again, but the GUI seems to lock up a little after doing a cosine or a sine. Are you using the C math functions cos(d), sin(d), tan(d)?

2. The calc keys really should respond to keyboard input. I really don't know why calc apps even have numeric keypads, I almost never use them anyway.

3. Some funkey things can start happening if you tru this: Hit 9, then +, then ^2. That sqaures 9, which is okay. Not hit + again. Heck any other function key if you like. Something really weird starts happening, and I'm not sure what.

4. Add a stack and I'd give it 5 stars. I love RPN =D

F-bacher
 
Yes, I am using tan() cos() etc. And they are almost instant for me. I'm not sure why they would be slow for you. Hrm.

I'm also going to get it to respond to keyboard input. I needed the backend working first though.

Hrm yes that is kind of funky, something is happening there it seems to be adding 9 again then squaring it or something. I'll figure it out.

A stack? RPN?

Thanks for the input! I'm glad you didn't find the other bug I know about :).
 
It's solid so far. If you clear something from memory and then call memory it should do nothing, or give an alert that there is nothing in memory instead of calling a 0 value. Thats the only suggestion I could think of.
 
Wow cool I like the tickertape. The clear button wasn't clearing the ticker tape though. The ticker is a tableView right? I just put something into my program that might be good for your ticker. When the ticker has enough data in it that you can scroll up and down and the user enters more info it should automatically jump to the bottom so they see the most recently entered data like in an instant message window, it stays at the bottom when new messages are sent.
Code:
[myTableView scrollRowToVisible:[myArray count] - 1];
edit: You updated from .3 to .5, do you just guestimate how much to increment version no? or is there a method to follow? I have never learned about that.
 
Usually when you update major things (interface, lots of code) you update by a few numbers. When it's a minor update (text or one graphic) you update by one exact number or "." number.

Example: Major update: from 1.0.1 to 1.1.4 or anything (1.2.0, anything!)
Example: Minor update: from 1.0.1 to 1.0.2 or anything (1.0.5, anything!)

Get it? Kind of confusing, but really it's up to the developer!
 
Yes, I messed up the screenshot URL. It is actually this: http://homepage.mac.com/jeffhume/calcex.jpg

Zots, I'm actually using a NSTextView not a table view. Maybe I should swithc it to a tableview, except I need to figure them out first :).

Also I did have a 0.4 version that didn't include all that stuff, I just didn't post it :).

The interface all changed around and I added tons more features from 0.3-0.5 so I think it deserved the title.
 
Well, I've been inspired to rebuild my old crappy rpn calc called xRPN, into something which I think is a lot cooler, which I have poorly named MathRPN. It's an RPN calculator with this little nice addition: you can act on numbers anywhere on the stack! So if I wanted to add together three numbers, i would select their cells and hit the add key. I'm really quite proud of where it's at. See the attached file (some of the best things are tiny) if you want to try it out. I still have to add constants, regular math expression evaluations, a service, an icon, more functions, custom functions, etc, but I like where it's at so far. Oh, open up your Console.app if you want to see error messages... need to make those into alerts some day. Oh, and I think the hyperbolic inverses aren't implemented yet... oh well.

Enjoy!
F-bacher
 

Attachments

  • mathrpn.zip
    20.6 KB · Views: 5
RPN == Rotating Plug Nozzle?

Or maybe Radio Philippines Network or
Reset Petri Nets or
Registered Psychiatric Nurse or
just perhaps maybe Reverse Polish Notation? :p
 
If you need info on converting radians to degress and back:

Radians to degrees: multiply by (180/<pi>)
Degrees to Radians multiply by (<pi>/180)
 
If you have a unit in degrees, and you want to convert it to radians, you have to multiply be  and divide by 180. To go the other way, mutliply by 180 and divide by .

F-bacher
 
Yes, I know, but there are built in degrees to radians and radians to degrees functions, so I'll just use those for now.

Also I'm doing a big rewrite of the app structure so I may not post an update for a while...

Except I posted one earlier this morning at http://homepage.mac.com/jeffhume/Calcex.sit

The only difference is that the tickertape autoscrolls with the text. My next version will be the one with big backend changes then I will get more features in there, like response to the num pad.
 
Whoa, option-p (aka pi) isn't coming through. That's why that last two posts about conversions look so weird :)

F-bacher
 
Yeah, so now I'm obsessed with this thing. Check it out: MathRPN

From the ReadMe:
1. Inline editing of stack items - double click a stack row and start editing
2. Drag and drop stack support - the easiest way to get at numbers at the bottom of your stack
3. Operation on selected item support - click on the number you want to operate on and the stack will do it's thing! Roll 8 items at a time or add one hundred numbers on your stack (one caveat is that ll operations work in stack mode, which means in arithmetic notation, that if I have 3,2,1 on stack rows 2,1,0, respectively, then selecting them all and subtracting will do the following 3 - (2 - 1) = 2 and not 3 -2 -1 = 0).
4. Autosave stack support - keep the stack just how you remembered it
5. Nifty number formatting support, located in the friendly implementation of the OmniGroup's (thanks guys!) preference system.
6. Helpful error sheets appear to help... or disable them in the preferences

Pretty sweet huh? I put it on versiontracker as well to see what kind of stuff I get from other users.

F-bacher
 
Ghoser, it crashes after about the first bounce in the dock :(.

I'll probably have a new build of Calcex Wednesday night (after my exams are over :)). There wont be any notable differences, except everything in the backend will be fixed up.
 
That's odd... I trashed my prefs just to check, and it launched fine. The vt guys had no problem with it either... strange. I hope this isn't some strange side-effect of using the April Beta Dev Tools... sigh...

F-bacher
 
Hehe, I was building against the OmniFrameworks... but wasn't having them copied into my app when built, making it impossible for users without them installed exactly where I had them installed to use it. Yeah, that was bad. Download from the same link, it actually works now!

:crosses fingers:

F-bacher
 
Back
Top