• 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 does not show contents on startup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView does not show contents on startup


  • Subject: Re: NSTableView does not show contents on startup
  • From: Neil Earnshaw <email@hidden>
  • Date: Mon, 25 Aug 2003 12:24:32 +0100

Tim,

I am trying to write an app which displays a table of information. I have created
a window containing an NSTableView wrapped in an NSScrollView.

Table views are automatically created within a scroll view in IB. Have you double wrapped it? That might explain why resizing doesn't refresh the table view but hiding and unhiding does.

I also have a controller class which is set to be the application's delegate. It
implements the applicationDidFinishLaunching method in which it loads data
from a file and populates an NSArray (which contains the table's data).

The controller it also set as the NSTableView's data source.
...
(2) Is there a general way to obtain a reference to an object created in IB and loaded from the
nib at runtime in my code?

Did you do this in IB? Does the controller have an "IBOutlet NSTableView* myTableView" instance var? If it does, then you can set this to point to the table view in IB. Then, when the nib is loaded, the connection will be made for you allowing you to invoke [myTableView reloadData]; in your controller's -windowDidLoad method (assuming your controller is a subclass of NSWindowController).

Hope this helps,

-Neil
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSTableView does not show contents on startup (From: Administrator <email@hidden>)

  • Prev by Date: Re: The resource fork
  • Next by Date: NSAttributedString
  • Previous by thread: Re: NSTableView does not show contents on startup
  • Next by thread: NSAttributedString
  • Index(es):
    • Date
    • Thread