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

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView


  • Subject: Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView
  • From: Peter Zegelin <email@hidden>
  • Date: Fri, 26 Jun 2009 13:02:28 +1000


On 26/06/2009, at 12:40 PM, Quincey Morris wrote:

On Jun 25, 2009, at 19:14, Peter Zegelin wrote:

Well I guess the question then becomes 'where is earlier'!

I tried overloading NSViewController::loadView and it also gets called 'after' the first call to numberOfRowsInTableView.
If I have the 3 methods awakeFromNib, numberOfRowsInTableView and loadView this is the calling sequence I get:


numberOfRowsInTableView
awakeFromNib
loadView
numberOfRowsInTableView
numberOfRowsInTableView
objectValueForTableColumn  <- drawing will start here I guess

Grahams suggestion is a good workaround (thanks!) but I still don't quite get it.


Your situation requires a little care because you (presumably, otherwise your question wouldn't make sense) have a NSTableView subclass,

Go easy on me here - but I just have a regular NSTableView - no subclass. The NSViewController - which is subclassed -is the delegate and handles numberOfRowsInTableView/ objectValueForTableColumn. So why didn't my question make sense?


(Alternatively, follow Graham's approach, which in effect makes initialization unnecessary.)

Yes this works fine.

Peter
_______________________________________________

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: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView
      • From: Quincey Morris <email@hidden>
References: 
 >NSViewController awakeFromNib and NSTableView numberOfRowsInTableView (From: Peter Zegelin <email@hidden>)
 >Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView (From: Keary Suska <email@hidden>)
 >Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView (From: Peter Zegelin <email@hidden>)
 >Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Quick DO endian question
  • Next by Date: Re: GC pros and cons
  • Previous by thread: Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView
  • Next by thread: Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView
  • Index(es):
    • Date
    • Thread