• 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: Dynamically loading NIB files into sheets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Dynamically loading NIB files into sheets
      • From: j o a r <email@hidden>
References: 
 >Re: Dynamically loading NIB files into sheets (From: Sebastian Celis <email@hidden>)

  • Prev by Date: Re: Dynamically loading NIB files into sheets
  • Next by Date: Re: Opening a folder in the finder
  • Previous by thread: Re: Dynamically loading NIB files into sheets
  • Next by thread: Re: Dynamically loading NIB files into sheets
  • Index(es):
    • Date
    • Thread