• 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
Re: pathForResource:ofType: failes under panther. (SOLVED)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pathForResource:ofType: failes under panther. (SOLVED)


  • Subject: Re: pathForResource:ofType: failes under panther. (SOLVED)
  • From: Fredrik Olsson <email@hidden>
  • Date: Thu, 13 Jul 2006 15:30:13 +0200

Fredrik Olsson skrev:
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.

Turns out that the symlinks in frameworks gets screwed up when copied
through a Samba volume.

// 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


_______________________________________________
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


References: 
 >pathForResource:ofType: failes under panther. (From: Fredrik Olsson <email@hidden>)

  • Prev by Date: Odd redraw issue
  • Next by Date: Re: Weird tabbing result... very weird
  • Previous by thread: pathForResource:ofType: failes under panther.
  • Next by thread: Will this code work?
  • Index(es):
    • Date
    • Thread