Hi,

I had one (set cell-based in IB) outline view in my project using custom cell 
for one table Column (identifier : “Description”).
And it was working fine with my AppDelegate implementing the required 
datasource and some delegate methods.

I added another (set view-based in IB) outline view and I am returning custom 
views in the following method (in AppDelegate):

- (NSView *)outlineView:(NSOutlineView *)outlineView 
viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item {
        NSString *identifier = [tableColumn identifier];
        if ([outlineView isEqualTo:outlineViewThumbs]) {
                if ([identifier isEqualToString:COLUMN_ID_DESC]) {// having 
only one table column
                return [item cellView];
                }
        }
        return nil;
}

This view-based outline view is working as expected, but the earlier cell-based 
outline is now showing empty rows (yes, it does populate as is evident from the 
vertical scroller and clicking also selects the row).
Adding a breakpoint in the above method, I can see it being called by 
cell-based outline view, and in this case this method returns nil. And the 
outlineView: objectValueForTableColumn: item: method doesn’t get called.
If I comment the last line in above method and return nothing for the 
cell-based outline view, the outlineView: objectValueForTableColumn: item: is 
called after the above method, but it leads to crash at another place in code 
where I’m doing [tabView display];. This tabView contains both the outline 
views in separate tabs.

How to tackle it?
Do I need to use two separate classes for datasource and delegate for the two 
outline views?

Thanks,
Navneet

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to