Problem loading Nib

  • Hi,

    Just got up this morning and ran a project of mine that was running
    fine last night, and im getting a weird error:

    Unable to load nib file: MainMenu, exiting

    The nib is in the project in resources, it's not red so xCode can find
    it. I also checked to make sure it was on disk, and its there. Funny
    thing, when i double click it in xCode, it opens up as a xml document
    in a xCode editor. If i double click it in the finder, it opens up in
    Interface Builder. Interface builder says all is go for this nib file.
    Also, seems like all my other nibs are acting up the same way.

    Any ideas?

    thanks

    AC
  • On 31 Oct 2007, at 13:13, Alexander Cohen wrote:

    > Just got up this morning and ran a project of mine that was running
    > fine last night, and im getting a weird error:
    >
    > Unable to load nib file: MainMenu, exiting
    >
    > The nib is in the project in resources, it's not red so xCode can
    > find it. I also checked to make sure it was on disk, and its there.
    > Funny thing, when i double click it in xCode, it opens up as a xml
    > document in a xCode editor. If i double click it in the finder, it
    > opens up in Interface Builder. Interface builder says all is go for
    > this nib file. Also, seems like all my other nibs are acting up the
    > same way.
    >
    > Any ideas?

    Have you opened (and saved) these files in IB3 on Leopard, perchance?
    And are you seeing this problem on OS X 10.4?  If so, make sure that
    the "Deployment Target" setting in the nib file's Info panel in IB3 is
    set to "Mac OS X 10.4".

    Kind regards,

    Alastair.

    --
    http://alastairs-place.net
  • > Have you opened (and saved) these files in IB3 on Leopard, perchance?
    > And are you seeing this problem on OS X 10.4?  If so, make sure that
    > the "Deployment Target" setting in the nib file's Info panel in IB3 is
    > set to "Mac OS X 10.4".

      If this is the case, note that there is a "known issue" with IB3
    where setting an old nib to work with earlier versions is not
    respected and the nib is saved as 10.5 regardless. This doesn't happen
    with all my nibs but those from a few old projects refuse to behave in
    this regard.

      In any case - and it's been mentioned many times before - XCode
    Tools related questions are best posted to the xcode-users list, not
    cocoa-dev.

    --
    I.S.
  • Hey Alexander -

    I would guess that the file type in Xcode has changed from 'file.xib'
    to 'text.xml'. Xcode associates a type with each file and uses that
    type to decide how to build the file. If the type for the file was
    switched from file.xib to text.xml that would explain it opening in
    the Xcode editor when double clicked. I would also guess that if you
    went into your built application with terminal you would see a
    MainMenu.xib file instead of a MainMenu.nib file. Instead of compiling
    the xib to a nib, xcode is probably just copying it straight across
    because it is confused and thinks it is just an XML document.

    You can change the file type associated with a file in Xcode by
    selecting it and then choosing 'get info'.

    Good Luck -
    Jon Hess

    On Oct 31, 2007, at 6:13 AM, Alexander Cohen wrote:

    > Hi,
    >
    > Just got up this morning and ran a project of mine that was running
    > fine last night, and im getting a weird error:
    >
    > Unable to load nib file: MainMenu, exiting
    >
    > The nib is in the project in resources, it's not red so xCode can
    > find it. I also checked to make sure it was on disk, and its there.
    > Funny thing, when i double click it in xCode, it opens up as a xml
    > document in a xCode editor. If i double click it in the finder, it
    > opens up in Interface Builder. Interface builder says all is go for
    > this nib file. Also, seems like all my other nibs are acting up the
    > same way.
    >
    > Any ideas?
    >
    > thanks
    >
    > AC
previous month october 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 31        
Go to today