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

Re: ButtonCell with Text in OutlineView


  • Subject: Re: ButtonCell with Text in OutlineView
  • From: "Kyle Sluder" <email@hidden>
  • Date: Fri, 16 May 2008 01:58:20 -0400

On Thu, May 15, 2008 at 1:39 PM, David <email@hidden> wrote:
> 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?

You bind the value of the column to a property, and then the column
loops N times, where N is the number of rows, setting the cell's value
and then drawing the cell in each row.  It's non-obvious until you
really understand how the view/cell dichotomy works.

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

I'm hesitant to suggest this because it seems like bad form (reminds
me of the magic \t character in Windows menus that separates the menu
item name from its accelerator key) but you could probably use a
custom cell and override its -setObjectValue: method to parse your
string and then call -setTitle: as appropriate.

--Kyle Sluder
_______________________________________________

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: David <email@hidden>
References: 
 >ButtonCell with Text in OutlineView (From: David <email@hidden>)

  • Prev by Date: Re: NSDictionaryController with NSTableView and sorting of numeric data
  • Next by Date: [MODERATOR] Re: WWDC ticket needed
  • Previous by thread: ButtonCell with Text in OutlineView
  • Next by thread: Re: ButtonCell with Text in OutlineView
  • Index(es):
    • Date
    • Thread