Re: Something truly fundamental I must be missing...
Re: Something truly fundamental I must be missing...
- Subject: Re: Something truly fundamental I must be missing...
- From: Markus Spoettl <email@hidden>
- Date: Wed, 10 Sep 2008 16:14:28 -0700
On Sep 10, 2008, at 3:51 PM, Joel Sherriff wrote:
----------------------------------------------
DialogController.m:------------------------------------
#import DialogController.h
@implementation DialogController
- (id) init {
self = [super init];
return self;
}
- (void) showDialog {
[Dialog orderFront:self];
}
@end
----------------------------------------------
DialogController.h:------------------------------------
#import <Cocoa/Cocoa.h>
@interface DialogController : NSObject {
IBOutlet NSPanel* Dialog;
}
- (void) showDialog;
@end
Make the DialogController a subclass of NSWindowController and
implement -init: as follows:
-(id)init
{
self = [super initWithWindowNibName:@"<DialogNibHere>"]; <<<<---
Nib Filename without extension
if (self) {
// custom initialization here
}
return self;
}
In Interface Builder, make sure you set class of the File's Owner
object of the nib file to DialogController. Also in IB, set the window
outlet of the File's Owner object to your panel (after setting the
class name).
This assumes that your dialog is in a separate nib, not in the main
menu nib file.
Regards
Markus
--
__________________________________________
Markus Spoettl
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden