Something missing here!
Something missing here!
- Subject: Something missing here!
- From: William Squires <email@hidden>
- Date: Tue, 03 Jun 2014 13:31:42 -0500
Okay, I created a "New File -> Objective C class" named SMPLRollPCWindowController, and checked the "create xib" checkbox. All okay there. I see the header and implementation file, plus my SMPLRollPCWindow.xib. But, here's the gotcha! According to the (rather simple) template code generated, there appears to be no way in which the window controller could load the xib!
SMPLRollPCWindowController.m
----------------------------
#import "SMPLRollPCWindowController.h"
#import "SMPLPlayer.h" // I added this
#pragma mark "Private Stuff" // and these #pragmas
@interface SMPLRollPCWindowController ()
@end
@implementation SMPLRollPCWindowController
#pragma mark "Memory Management"
- (id)initWithWindow:(NSWindow *)window
{
if (self = [super initWithWindow:window])
{
// Initialization code here.
}
return self;
}
#pragma mark "Delegate Methods"
- (void)windowDidLoad
{
[super windowDidLoad];
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
}
#pragma mark "Actions" // and this little section.
-(IBAction)playerDone:(id)sender
{
}
@end
This is a straight copy-and-paste from Xcode into this message. There's no reference whatsoever to "SMPLRollPCWindow.xib" so what gives? Am I supposed to add/replace the code in initWithWindow:, or did Xcode forget to put the relevant template code in to load the actual xib?
Second question, if I want this window to be a moveable modal, what do I need to change? Most "learning MacOS X" books cover low-level ObjC stuff, and then pay little attention to windows, and more attention to exciting technologies like NSTableViews, Outlets and Actions, and other stuff. Even iOS has segues to help the developer visualize the flow from one view to another, but OS X doesn't have segues (that I know of, anyway). So creating/manipulating "extra" windows (those not in MainMenu.xib) is somewhat of a "terra incognita" to me...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden