Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Beginner Trying to build iPod Calculator

Options
  • 12-01-2010 11:37am
    #1
    Registered Users 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 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    Can you post the error that gets display?


  • Registered Users 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 Posts: 18,272 ✭✭✭✭Atomic Pineapple


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


Advertisement