• 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: NSButtonCell columns in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButtonCell columns in NSOutlineView


  • Subject: Re: NSButtonCell columns in NSOutlineView
  • From: Marcus Roberts <email@hidden>
  • Date: Mon, 15 Aug 2005 21:12:47 +0100

On 8/15/05, Corbin Dunn <email@hidden> wrote:

> > The problem is I can't bind the same values here as I can in the
> > normal bindings - an error is returned that an NSControllerTreeProxy
> > object is not key value coding-compliant for the key selected.
>
> I gave this a try (in Tiger) and it seems to work correctly. However,
> it won't work the way you expect it to. One cell is shared for each
> table column. Therefore, binding anything to it will always display
> the same value in every column of that cell. Hopefully that makes
> sense -- if not, let me know and i can explain further.

That makes perfect sense - when I added another binding, I saw exactly
that happen.

>
> To do what you want, you will probably have to handle the
> willDisplayCell: delegate method for tableview and setup the cell
> each time before it is being displayed by accessing your array
> controller (in code).

Thanks for the pointer.  I've implemented a delegate that works now,
which is great!
My only worry is that I'm using the observedObject method on the
_NSArrayControllerTreeNode item that's passed in.  I gather that this
is a private method that could break in the future - is there a better
way of getting the current item when using an NSTreeController?

Thanks again for your help.

Marcus
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSButtonCell columns in NSOutlineView
      • From: Corbin Dunn <email@hidden>
References: 
 >NSButtonCell columns in NSOutlineView (From: Marcus Roberts <email@hidden>)
 >Re: NSButtonCell columns in NSOutlineView (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: File choose context info problem
  • Next by Date: how can one programmatically check if text fits in cells and text-views?
  • Previous by thread: Re: NSButtonCell columns in NSOutlineView
  • Next by thread: Re: NSButtonCell columns in NSOutlineView
  • Index(es):
    • Date
    • Thread