• 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
ButtonCell with Text in OutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ButtonCell with Text in OutlineView


  • Subject: ButtonCell with Text in OutlineView
  • From: David <email@hidden>
  • Date: Thu, 15 May 2008 13:39:18 -0400

I'm trying to have a hierarchical set of choices with a checkbox next to
each one. How can I best set this up?
My current thinking was to try and create a NSButtonCell subclass which
would act like a NSTextCell in that setting its value would set its title,
but I'd parse the string which is encoded with a flag to indicate if the
button is selected or not.

I have NSTreeController bound to my model and the column in NSOutlineView
bound to the appropriate key path in NSTreeController.

I do not understand how the column in the NSOutlineView knows how to set the
property to the cell. How are the cell and column related? How do they
interact?

What method do I need to implement in my cell to intercept the value being
set so that I can in turn set the title and button state?

Is this the best approach? Is there some other preferred approach to this
common problem?

Thanks
_______________________________________________

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: ButtonCell with Text in OutlineView
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Re: cocoa mentoring (was Re: Bypassing Interface Builder)
  • Next by Date: Re: iPhone: Question about keyboard / drawing
  • Previous by thread: Re: Subject: Re: Bypassing Interface Builder
  • Next by thread: Re: ButtonCell with Text in OutlineView
  • Index(es):
    • Date
    • Thread