• 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: NSTableView and loadNibNamed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView and loadNibNamed


  • Subject: Re: NSTableView and loadNibNamed
  • From: Keary Suska <email@hidden>
  • Date: Sun, 04 May 2008 10:11:46 -0600
  • Thread-topic: NSTableView and loadNibNamed

on 5/4/08 9:14 AM, email@hidden purportedly said:

> I have a NSTableView as an instance of a NSWindowController declared as:
>
> @interface TableController : NSWindowController {
>     IBOutlet NSWindow*                   tableWindow;
>     IBOutlet NSTableView*                dataTable;
>     IBOutlet NSTableHeaderView*          headers;
>     IBOutlet NSTableColumn*              column;
> }
>
> I read in the NIB using:
> [NSBundle loadNibNamed:@"tableWindow" owner:tableController]

Did you set the file's owner of the nib to your TableController  class? Are
all the outlets connected? Is tableController non-nil when you call the
above method?

> Indeed  the NIB tableWindow has file's Owner set to tableController and
> there is a connection made to dataTable
> from a TableController object.
>
> I get a pointer to tableController, but the field dataTable is nil.

What do you mean by "get a pointer to tableController"? How are you getting
the pointer? Should you have already created it before calling -loadNibNamed
? If your outlet is nil, it is not getting connected.

> How do I get dataTable to point to the NSTableView in the nib?

1. Set the "File's Owner" in the nib  to your custom class
2. Connect the dataTable outlet to the NSTableView

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

  • Follow-Ups:
    • Re: NSTableView and loadNibNamed
      • From: Joseph Ayers <email@hidden>
References: 
 >NSTableView and loadNibNamed (From: Joseph Ayers <email@hidden>)

  • Prev by Date: Mail.app account preferences
  • Next by Date: Re: Mail.app account preferences
  • Previous by thread: NSTableView and loadNibNamed
  • Next by thread: Re: NSTableView and loadNibNamed
  • Index(es):
    • Date
    • Thread