• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
pathForResource:ofType: failes under panther.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pathForResource:ofType: failes under panther.


  • Subject: pathForResource:ofType: failes under panther.
  • From: Fredrik Olsson <email@hidden>
  • Date: Wed, 12 Jul 2006 16:35:31 +0200

This method located in a framework bundled with the application failes to get he path to the nib under Panther, but works like a charm under Tiger:

- (void)makeWindowControllers
{
NSBundle *bundle = [NSBundle bundleForClass:[MTGMTXDocument class]];
if (bundle) {
NSLog([bundle bundlePath]);
NSLog([bundle bundleIdentifier]);
NSLog([bundle isLoaded] ? @"Is loadded" : @"Is not loaded");
NSString *nibPath = [bundle pathForResource:@"StandardWindow" ofType:@"nib"];
if (nibPath) {
NSWindowController *controller = [[MTWindowController alloc] initWithWindowNibPath:nibPath owner:self];
[self addWindowController: controller];
[controller testStuff:self];
RELEASE(controller);
} else {
NSLog(@"Could not get nib path");
}
} else {
NSLog(@"Could not get bundle");
}
}


I get no error messages, in any logs, it just silently return nil.

The nib and MTGMTXDocument class are in the same framework. The actual class of the instance when this gets executed is a subclass of MTGMTXDocument, and is loaded from a separate plug-in bundle.

// Fredrik Olsson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: pathForResource:ofType: failes under panther. (SOLVED)
      • From: Fredrik Olsson <email@hidden>
  • Prev by Date: Re: DNS lookup for SMB
  • Next by Date: Re: Helper tool, root and MoreAuthSample?
  • Previous by thread: Re: DNS lookup for SMB
  • Next by thread: Re: pathForResource:ofType: failes under panther. (SOLVED)
  • Index(es):
    • Date
    • Thread