true newbie Q: my app can't find the .nib file (SDL)

Member
Posts: 41
Joined: 2006.01
Post: #1
I put SDL in the app like it says to in the 'structions and all I get is:

2006-01-17 22:01:18.762 HG 1.5 (X SDL)[469]
Unable to load nib file: main, exiting

If I don't enable the .nib (#define SDL_USE_NIB_FILE 1), everything's fine. The folks at SDL seem to thing their creation is baby-proof and it should just work.

If anybody has an idea why it won't find the *&%^# nib, can you give me a clue? I've tried sacrificing a toaster to my computer and even that didn't work.

Chris
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
did you also put the nib in your app?
Quote this message in a reply
Member
Posts: 41
Joined: 2006.01
Post: #3
The nib is in the app. Under 'resources'. I've tried renaming it, taking off the .nib, and countless other things that are lost in the fog of the last 8 hours.

I know it's a rediculous problem but I'm stuck.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
Should be MainMenu.nib, in Contents/Resources

I've never used the SDL nib, though...
Quote this message in a reply
Member
Posts: 41
Joined: 2006.01
Post: #5
How do you control where it ends up after you compile?

I assume it can be anywhere before you compile, as long as there is a reference to it under 'resources'.
Quote this message in a reply
Moderator
Posts: 700
Joined: 2002.04
Post: #6
SDL screws with the currrent working directory - unless in your code you've changed the CWD to be "x.app/Content/Resources" prior to trying to open the .nib, the CWD will be the directy which contains "x.app" - try moving the .nib there (just a suggestion, as I've never tried using .nibs with SDL.)

N.b. anything in the resources tab in Xcode is copied into "x.app/Content/Resources"

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Member
Posts: 41
Joined: 2006.01
Post: #7
I remade the project and copied everything in and it just started working.

My coworker says he's seen this happen before. Without word-of-mouth I could have screwed around with this thing for ages.

Thanks folks
Quote this message in a reply
Post Reply