Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoa failed to load window nib file when nib is localized

I'm trying to create and show new window in my simple Cocoa application:

myWindow = [[MyWindowController alloc] initWithWindowNibName:@"MyWindow" owner:self];
[myWindow showWindow:self];

It's working well with basic nib file without localization, but as soon as I turn on localization for this specific nib file (using Xcode "localize" option available form file inspector), the application gives me this error when executing the code above:

-[MyWindowController loadWindow]: failed to load window nib file 'AuthWindow'.

Should I change the way I'm initializing my window controller when using localized nibs? It fails only when nib containing a window is localized (with just one language - English), when there is no localization configured - the window is loaded and appears on the screen as it should. I can't find the right answer, I'm new to Cocoa on OSX, but have some experience with CocoaTouch and developing for iOS.

like image 848
Darrarski Avatar asked Dec 03 '22 23:12

Darrarski


1 Answers

I restarted Xcode and the error went away...

I don't know... but whatever...

like image 56
kdbdallas Avatar answered Dec 05 '22 12:12

kdbdallas