Can't get xCode -> IB integration to work.

  • Hi,

    I am trying to finish the Objective-C 2.0 example of the Currency
    Converter app.  But i can't get IB to read the CurrencyController.h,
    either from the Read Files menu item or from dragging & dropping the
    file from xCode to the IB window, so I have some outlets and actions
    to connect to the UI.  The blue cube representing the controller
    never appears.  I have tried with several new projects, both
    following the instructions and trying to get the process to work with
    a single IBOutlet and IBAction.  I have also tried with a combination
    of floats, ints, NSStrings etc.

    There appears to be no console messages or other form of output from
    IB to tell me what is wrong.  The button in the lower left corner of
    the main IB object window is green with the name of the project.  The
    project info screen in IB shows the name of the project and the path
    are both correct.

    I have taken these steps to try to fix the problem.
    1. Deleted the /Developer folder and re-installed the developer tools.
    2. Formatted the drive and reinstalled Leopard and the developer tools.
    3. Downloaded the companion files project code from Apple.

    This is where it got interesting.  The Apple project code worked
    perfectly; I could add IBOutlets in xCode and the changes would
    appear in IB.  But if I copied the CurrencyController.h file from the
    Apple project to any my projects, IB still won't create the blue cube.

    If it makes any difference it is a white 20" iMac with completely
    default settings.

    Has anyone else had this problem and solved it?

    Any other suggestions?
  • Richard, I've been reading about this all night, but unfortunately am
    back on a Tiger machine at the moment. This is the doc that has been
    most helpful...

    http://developer.apple.com/documentation/DeveloperTools/Conceptual/IB_UserG
    uide/ConnectionsandBindings/chapter_6_section_3.html#//apple_ref/doc/uid/TP
    40005344-CH7-SW31


    I believe what you need to try is dragging a generic NSObject from the
    IB Library to the IB Browser for your project. Then click once on the
    NSObject (to select it) and look at the Inspector's "identity" pane
    (the "i" in a circle). There you replace the NSObject class name with
    the name of the class you have in XCode (looks like
    "CurrencyController") in your case. It should autocomplete (or be on
    the dropdown menu even) if the "green light" shows you are associated
    with your XCode project.

    I hope that helps. If not, you may find more input on this at the
    xcode-users list. This list seems to be more for Cocoa issues than
    XCode/IB issues.

    Good luck!
    ...Eric

    On 11/4/07, Richard Stacpoole <rstacpol...> wrote:
    >
    > Hi,
    >
    > I am trying to finish the Objective-C 2.0 example of the Currency
    > Converter app.  But i can't get IB to read the CurrencyController.h,
    > either from the Read Files menu item or from dragging & dropping the
    > file from xCode to the IB window, so I have some outlets and actions
    > to connect to the UI.  The blue cube representing the controller
    > never appears.  I have tried with several new projects, both
    > following the instructions and trying to get the process to work with
    > a single IBOutlet and IBAction.  I have also tried with a combination
    > of floats, ints, NSStrings etc.
    >
    > There appears to be no console messages or other form of output from
    > IB to tell me what is wrong.  The button in the lower left corner of
    > the main IB object window is green with the name of the project.  The
    > project info screen in IB shows the name of the project and the path
    > are both correct.
    >
    > I have taken these steps to try to fix the problem.
    > 1. Deleted the /Developer folder and re-installed the developer tools.
    > 2. Formatted the drive and reinstalled Leopard and the developer tools.
    > 3. Downloaded the companion files project code from Apple.
    >
    > This is where it got interesting.  The Apple project code worked
    > perfectly; I could add IBOutlets in xCode and the changes would
    > appear in IB.  But if I copied the CurrencyController.h file from the
    > Apple project to any my projects, IB still won't create the blue cube.
    >
    > If it makes any difference it is a white 20" iMac with completely
    > default settings.
    >
    > Has anyone else had this problem and solved it?
    >
    > Any other suggestions?
    >

    --
    Eric Celeste / http://eric.clst.org / Saint Paul, MN / 651-323-2009 /
    <efc...>
  • On 04/11/2007, at 4:58 PM, Eric Celeste wrote:

    > Richard, I've been reading about this all night, but unfortunately am
    > back on a Tiger machine at the moment. This is the doc that has been
    > most helpful...
    >
    > http://developer.apple.com/documentation/DeveloperTools/Conceptual/
    > IB_UserGuide/ConnectionsandBindings/chapter_6_section_3.html#//
    > apple_ref/doc/uid/TP40005344-CH7-SW31
    >
    > I believe what you need to try is dragging a generic NSObject from the
    > IB Library to the IB Browser for your project. Then click once on the
    > NSObject (to select it) and look at the Inspector's "identity" pane
    > (the "i" in a circle). There you replace the NSObject class name with
    > the name of the class you have in XCode (looks like
    > "CurrencyController") in your case. It should autocomplete (or be on
    > the dropdown menu even) if the "green light" shows you are associated
    > with your XCode project.
    >
    > I hope that helps. If not, you may find more input on this at the
    > xcode-users list. This list seems to be more for Cocoa issues than
    > XCode/IB issues.
    >
    > Good luck!
    > ...Eric

    Erics method works very well.  It will do until IB works as advertised.

    Thanks Eric!
  • On Nov 4, 2007, at 12:31 AM, Richard Stacpoole wrote:
    >>> I am trying to finish the Objective-C 2.0 example of the Currency
    >>> Converter app.  But i can't get IB to read the
    >>> CurrencyController.h, either from the Read Files menu item or from
    >>> dragging & dropping the file from xCode to the IB window, so I
    >>> have some outlets and actions to connect to the UI.  The blue cube
    >>> representing the controller never appears.
    [...]
    > On 04/11/2007, at 4:58 PM, Eric Celeste wrote:
    >
    >> [...]
    >> I believe what you need to try is dragging a generic NSObject from
    >> the
    >> IB Library to the IB Browser for your project. Then click once on the
    > [...]
    > Erics method works very well.  It will do until IB works as
    > advertised.
    >
    This is how IB is advertised to work.

    In the tutorial:
    "3. In the library, drag an object item into the MainMenu.nib window."
    <http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/06Co
    ntroller/chapter_6_section_6.html
    >:

    See also the IB User Guide <http://developer.apple.com/documentation/DeveloperTools/Conceptual/IB_UserG
    uide/index.html
    >.

    Follow-ups to the Xcode-users list <xcode-users...>.

    mmalc
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today