Xcode giving me headaches

Discussion in 'Mac Programming' started by jeanlain, Aug 27, 2012.

  1. jeanlain macrumors 65816

    Joined:
    Mar 14, 2009
    #1
    Xcode doesn’t seem to update its interface and behaviour in response to my code. For instance, the connection inspector says that an object has an outlet connected to another, even though I removed the outlet long ago (and even the connected object). After renaming, it keeps old object names around.
    This wouldn’t be a problem if it didn’t prevent my app from buidling because of « unknown type RandomClass» (even though it recognize RandomClass since it autocompletes the name!). Restarting doesn’t help.

    Any suggestion to make this progam behave itself? This is my first project and I may have missed some important settings.
     
  2. PatrickCocoa macrumors 6502a

    Joined:
    Dec 2, 2008
    #2
    Don't look under your bed!

    You probably have something still connected, as you indicated. This exact same thing happened to me just yesterday.

    To find the evil unwanted connections:

    First, if you're not familiar with the names of the various panes in Xcode, spend a few minutes moving your cursor around and pausing on the various items. Also, look at the Editor, View, and Organizer buttons on the far right. Click them and see what sub-panes appear and disappear. Fun!

    I'm using Xcode 4.5 for the text below.

    Open Xcode, open your project. Select one of your .xib files in the left hand Project Navigator. Just to the right of the Project Navigator should be a column that has a box labeled "Objects". Expand each object with its disclosure triangle (if it has one). Click on the top object, then on the far right in the Utilities column, click the rightward facing arrow labeled Connections Inspector. Look at the connections that have a filled-in dot. If one of those is the offending connection (the one you don't want), click the little "x" to get rid of it.

    If you can't figure out which connections you want and which you don't, you may want to delete all connections, then re-establish the one(s) you want. Note that you can control drag from a .xib to a .h file (if you have both visible in Xcode) and have Xcode create the connection.

    This way will be helpful if you want to learn more about Xcode and debugging in your new environment. If you get frustrated, just start a new project and rebuild everything.

    By the way, what version of Xcode, what OS, what's your target OS, and what template did you use when you created a new Xcode project?
     
  3. jeanlain thread starter macrumors 65816

    Joined:
    Mar 14, 2009

Share This Page