• 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: How to: NSTableView redisplay
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to: NSTableView redisplay


  • Subject: Re: How to: NSTableView redisplay
  • From: Graham Cox <email@hidden>
  • Date: Wed, 29 Feb 2012 19:25:03 +1100

On 29/02/2012, at 5:47 PM, Jens Alfke wrote:

>
> On Feb 28, 2012, at 8:39 PM, Erik Stainsby wrote:
>
>> 	[_rules addObject: rule];
>> 	[table reloadData];
>> 	[table setNeedsDisplay:YES];
>
> IIRC you need to call -noteNumberOfRowsChanged instead, if you've change the number of rows. -reloadData is just for reloading the existing rows.


That's news to me - I've always just called -reloadData. I believe it queries the rowCount, and then marks as needing redisplay those rows that are visible. This might be less optimal that reloading only the changed rows, but as far as I know, this has always worked fine for me.

Erik's code looks OK, but we don't know that the outlet <table> is actually pointing to anything, or that it's pointing to the correct thing. That's what I'd check first - set a breakpoint in appendRule: and have a look at it.

--Graham



_______________________________________________

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: How to: NSTableView redisplay
      • From: Erik Stainsby <email@hidden>
    • Re: How to: NSTableView redisplay
      • From: Erik Stainsby <email@hidden>
References: 
 >How to: NSTableView redisplay (From: Erik Stainsby <email@hidden>)
 >Re: How to: NSTableView redisplay (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: How to: NSTableView redisplay
  • Next by Date: play time
  • Previous by thread: Re: How to: NSTableView redisplay
  • Next by thread: Re: How to: NSTableView redisplay
  • Index(es):
    • Date
    • Thread