Re: NSTableView display issue
Re: NSTableView display issue
- Subject: Re: NSTableView display issue
- From: Keary Suska <email@hidden>
- Date: Wed, 22 Sep 2010 13:23:00 -0600
On Sep 22, 2010, at 1:01 PM, email@hidden wrote:
> Besides bindings and KVO issues, anything else to look at? I am not using bindings nor is this KVO.
Have you verified that the NSTableView instance you are calling is non-nil *and* the expected object?
> On Sep 22, 2010, at 12:12 PM, Quincey Morris wrote:
>
>> On Sep 22, 2010, at 10:28, email@hidden wrote:
>>
>>> I have an NSTableView in an NSSplitView.
>>>
>>> I call -reloadData and -setNeedsDisplay:YES
>>>
>>> The table does not redisplay with the new data until the split view is resized. From that point forward it behaves properly with subsequent -reloadData and -setNeedsDisplay:YES calls.
>>>
>>> Is there something basic I am missing here?
>>
>> No, probably not. It's likely just a bug in your code.
>>
>> The usual cause of this kind of weirdness is that the table is bound to (or otherwise KVO-dependent on) a property that's not properly KVO compliant, and the binding was established before the property was set to its proper value (in a complex sequence of NIB-loading steps). Often, an unrelated action (such as resizing the split view) happens to cause the property to be re-set later, which "fixes" the problem.
>>
>> Sometimes it's quite hard to see the lack of KVO compliance in your code, or even to know where to look for it. I'd recommend against thinking in terms of a flaw in 'reloadData' or 'setNeedsDisplay:'.
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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