• 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: Erik Stainsby <email@hidden>
  • Date: Wed, 29 Feb 2012 08:49:09 -0800

Supplemental:  the table only renders once. However many objects are in the _rules array are presented when any column header is activated. Then the table freezes up.  Additionally items can be added to the array; nothing more happens with the table view.


Erik Stainsby
email@hidden
-------------------------------------
Consistently place constants on the LHS of an expression: you cannot accidentally assign when you meant to compare.




On 2012-02-29, at 12:25 AM, Graham Cox wrote:

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

  • Prev by Date: Re: How to: NSTableView redisplay
  • Next by Date: Re: Round corners of borderless NSWindow without set it transparent
  • Previous by thread: Re: How to: NSTableView redisplay
  • Next by thread: Re: How to: NSTableView redisplay
  • Index(es):
    • Date
    • Thread