Re: NSOutlineView - Items only displays when user scrolls in outline view
Re: NSOutlineView - Items only displays when user scrolls in outline view
- Subject: Re: NSOutlineView - Items only displays when user scrolls in outline view
- From: Gilles Celli <email@hidden>
- Date: Fri, 02 Sep 2011 22:16:23 +0200
Michael & Graham: thanks for the reply
I agree that my Item class and its structure for the outline view has to be reworked...I'll let you know since I'm on vacancy for one week…
-Gilles
On 2 sept. 2011, at 14:35, Michael Babin wrote:
> On Sep 2, 2011, at 7:15 AM, Gilles Celli wrote:
>
>> I've setup a Document based application with an NSOutlineView which displays Parent-Item along with its children…with XCode 4 on OS X Lion.
>>
>> When launching the application, the outline view shows the Root title…only if I refresh the outline view the children are displayed too.
>>
>> I've also tried to do a reloadData along with reloadItem:nil reloadChildren:YES for the OutlineView (in method windowDidLoad and tried also
>> (void)applicationDidFinishLaunching: ) but this doesn't fix it…
>>
>> However I've setup a NSButton to refresh the outlineView which then calls 'reloadData' and 'reloadItem:nil reloadChildren:YES' and then it works…
>> but this is of course not the solution I want…
>
> This sounds like a problem of not having the data structure(s) initialized/populated/connected when the outline view asks for the items to be displayed, and then not notifying the outline view that it needs to reload when the data is actually available.
>
> I assume you're using a data source for your outline view? If so, try setting a breakpoint on your -outlineView:numberOfChildrenOfItem: method to see when the outline view is asking for the data, and then look at the source of that data to figure out why it is not available at that point (and when it is available).
>
_______________________________________________
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