On Wed, Oct 29, 2008 at 9:29 AM, Daniel <[EMAIL PROTECTED]> wrote: > Hi, > > thank you for your reply. > > Does this mean that I'm trying to loading a NIB file from the bundle > of the running application (in which the input manager has been > loaded)? > > NSBundle *bundle = [NSBundle bundleWithIdentifier: @"org.x616c.LMC"]; > > I've found out how to find the right bundle, but I'm still stuck in > trying to load a window from a NIB file inside my bundle ... can > someone help me?
Your last post indicated an NSWindowController being used to load the nib. I am not 100% sure on this (please post your code when you have question!) but that's how it appeared. If so, then you should be able to get things working by using a custom subclass of NSWindowController that's in your bundle. NSWindowController is, I think, smart enough to look in the same bundle as the class of the object doing the loading. Failing that, rather than using -initWithWindowNibName:, use -initWithWindowNibPath:owner: which allows you to specify a full path. NSBundle can get you a full path for any resource file. If you want to load the nib manually (not recommended, always use NSWindowController or NSViewController to load nibs) then you can use the NSNib class, or one of the NSBundle extensions in NSNibLoading.h. Mike _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
