• 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
Something missing here!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Something missing here!
      • From: Jonathan Mitchell <email@hidden>
  • Prev by Date: Re: swift and objective-c
  • Next by Date: Re: Something missing here!
  • Previous by thread: Re: SDL framework not found
  • Next by thread: Re: Something missing here!
  • Index(es):
    • Date
    • Thread