• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OutlineView Wierdness - 'item' not being stored.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OutlineView Wierdness - 'item' not being stored.


  • Subject: Re: OutlineView Wierdness - 'item' not being stored.
  • From: Graham Cox <email@hidden>
  • Date: Wed, 26 May 2010 22:27:01 +1000

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

  • Follow-Ups:
    • Re: OutlineView Wierdness - 'item' not being stored.
      • From: Pascal Harris <email@hidden>
References: 
 >OutlineView Wierdness - 'item' not being stored. (From: Pascal Harris <email@hidden>)

  • Prev by Date: Re: rendering PDF on iPad's
  • Next by Date: Re: subclass overwriting superclass ivar
  • Previous by thread: OutlineView Wierdness - 'item' not being stored.
  • Next by thread: Re: OutlineView Wierdness - 'item' not being stored.
  • Index(es):
    • Date
    • Thread