Re: Dynamically loading NIB files into sheets
Re: Dynamically loading NIB files into sheets
- Subject: Re: Dynamically loading NIB files into sheets
- From: Sebastian Celis <email@hidden>
- Date: Tue, 16 Apr 2002 01:12:04 -0500
Actually, I just figured out that my problem lies in the line of code:
[NSApp beginSheet:[theSheetController window]
I tried making a new window inside myDocument.nib, and passing it
instead of [theSheetController window]...
Everything worked fine.
Am I returning something wrong? Here is the code that makes
theSheetController:
- (id)sheetControllerForIdentifier:(NSString *)identifier
{
id aSheetController = [theSheetControllers objectForKey:identifier];
if(aSheetController != nil)
{
NSLog(@"Returning a sheetController already allocated");
return aSheetController;
}
else
{
NSLog(@"Making a SheetController");
aSheetController = [[SheetControllerA alloc] init];
[theSheetControllers setObject:aSheetController
forKey:identifier];
return aSheetController;
}
}
@implementation SheetControllerA
- (id)init
{
self = [super initWithWindowNibName:@"SheetControllerA"];
return self;
}
@end
Thanks again for your help. I really appreciate you spending time
trying to guide an inexperienced and confused Cocoa programmer along.
Sebastian
_______________________________________________
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.