iDevGames Forums
true newbie Q: my app can't find the .nib file (SDL) - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: true newbie Q: my app can't find the .nib file (SDL) (/thread-4604.html)



true newbie Q: my app can't find the .nib file (SDL) - Chris Ball - Jan 17, 2006 11:10 PM

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


true newbie Q: my app can't find the .nib file (SDL) - OneSadCookie - Jan 17, 2006 11:13 PM

did you also put the nib in your app?


true newbie Q: my app can't find the .nib file (SDL) - Chris Ball - Jan 17, 2006 11:16 PM

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.


true newbie Q: my app can't find the .nib file (SDL) - OneSadCookie - Jan 17, 2006 11:18 PM

Should be MainMenu.nib, in Contents/Resources

I've never used the SDL nib, though...


true newbie Q: my app can't find the .nib file (SDL) - Chris Ball - Jan 17, 2006 11:48 PM

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'.


true newbie Q: my app can't find the .nib file (SDL) - sealfin - Jan 18, 2006 06:02 AM

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"


true newbie Q: my app can't find the .nib file (SDL) - Chris Ball - Jan 18, 2006 08:07 AM

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