Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Beginner Trying to build iPod Calculator

  • 12-01-2010 11:37AM
    #1
    Registered Users, Registered Users 2 Posts: 99 ✭✭


    I'm at the very start of my iPhone development learning curve, so any help at all, no matter how trivial would be much appreciated.

    I've started a basic arithmetic app that applies a different operation (+-*/) to two float variables, depending on the button pressed & generates a result.

    I've created my IBOutlet for the label to display the result & IBAction method for the button.
    I've synthesized all of the variables etc & made all the necessary connections (Touch Up action is assigned to the buttonPressed method for all 4 buttons).

    buttonPressed method contains an if else statement with different arithmetic operation depending on the ID of the sender.

    When I Build & Run, it launches the app in the simulator but when I click any of the buttons, it throws an unknown exception. Here is where I dont know where Ive gone wrong or what to do


Comments

  • Registered Users, Registered Users 2 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    Can you post the error that gets display?


  • Registered Users, Registered Users 2 Posts: 99 ✭✭fun.bobby1981


    I think I've discovered what was causing that particular error.

    When I initially set up the buttons, I was declaring them as random names & when I got more au fairt with the syntax, I changed the button names to something more meaningful.

    However by this time I had already linked the buttons & compiled & run the app & I saw an error saying the button was trying to link to the old object name, but that it was no longer defined.

    Is this something that also needs to be updated in the control properties in Interface Builder?


  • Registered Users, Registered Users 2 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    Never done iPhone development but I'd imagine it would be


Advertisement