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 <graham....@bigpond.com> 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 (Cocoa-dev@lists.apple.com)

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

This email sent to arch...@mail-archive.com

Reply via email to