• 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: Something truly fundamental I must be missing...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Something truly fundamental I must be missing... (From: Joel Sherriff <email@hidden>)

  • Prev by Date: Re: API for secured web service communication (WSSE)
  • Next by Date: Re: mailbundle info
  • Previous by thread: Something truly fundamental I must be missing...
  • Next by thread: Re: Something truly fundamental I must be missing...
  • Index(es):
    • Date
    • Thread