Re: OutlineView Wierdness - 'item' not being stored.
Re: OutlineView Wierdness - 'item' not being stored.
- Subject: Re: OutlineView Wierdness - 'item' not being stored.
- From: Pascal Harris <email@hidden>
- Date: Wed, 26 May 2010 16:45:14 +0100
Thanks for this - I've done as you suggested and it works fine. Serves me
right for attempting to learn from examples on the web ;)
On Wed, May 26, 2010 at 1:27 PM, Graham Cox <email@hidden> wrote:
>
> On 26/05/2010, at 10:12 PM, Pascal Harris wrote:
>
> > - (id)outlineView:(NSOutlineView *)outlineView
> > objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
> > {
> > if ([[[tableColumn headerCell] stringValue] compare:@"Key"] ==
> > NSOrderedSame)
> > {
>
>
> I'm not sure what the problem is, but the code is a mess, which will
> probably explain much of it.
>
> If you can't reduce this method to:
>
> - (id) outlineView:(NSOutlineView*) outlineView
> objectValueForTableColumn:(NSTableColumn*) tableColumn byItem:(id) item
> {
> return [item valueForKey:[tableColumn identifier]];
> }
>
> Then your controller design should be looked at and reorganised until you
> can. It might mean wrapping up certain elements of your data model into
> "presentable" objects that can be passed to the outline view and treated
> consistently. Outline views become ultra-easy when you do this.
>
> I'd also be very wary of writing files in any of these methods, even for
> test purposes.
>
> --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