Re: load a NIB from NSData
Re: load a NIB from NSData
- Subject: Re: load a NIB from NSData
- From: Timothy Ritchey <email@hidden>
- Date: Wed, 12 Jun 2002 12:32:20 -0500
On Wednesday, June 12, 2002, at 11:36 AM, Ondra Cada wrote:
NIB file that has been loaded into an NSData object...
How? NIB is actually a folder, containing (normally) three different
files!
That is a bloody good question. This little ditty:
NSBundle *mBundle = [NSBundle mainBundle];
NSString *path = [mBundle pathForResource:@"test" ofType:@"nib"];
data = [NSData dataWithContentsOfFile:path];
wasn't throwing an error, but after reading your e-mail, when I added
this line:
NSLog([NSString stringWithFormat:@"%@: %d", path, [data length]]);
I was greeted with a zero data length. I never checked it, because I was
still trying to figure out how to load it on the other end. I forgot
that a nib was in fact a folder. Perhaps I am barking up the wrong tree
entirely.
- tim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.