Re: How to: NSTableView redisplay
Re: How to: NSTableView redisplay
- Subject: Re: How to: NSTableView redisplay
- From: Erik Stainsby <email@hidden>
- Date: Wed, 29 Feb 2012 08:26:25 -0800
The <table> is connected to the nib. The <table> is not instantiated elsewhere. Content does show up after the table column headers are manipulated so the column defs are reasonable. I'll give Jens' suggestion a try but I have only seen the form below cited. I'll remove the extraneous setNeedsDisplay: call;
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