• 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: NSOutlineView, NSBrowserCell and Images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView, NSBrowserCell and Images


  • Subject: Re: NSOutlineView, NSBrowserCell and Images
  • From: Brian Bergstrand <email@hidden>
  • Date: Wed, 26 May 2004 16:03:23 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris!

Thank you, thank you! You solved my problem. I was not setting the cell
icon every time through. I was testing (nil == [cell image]) and only
setting the icon if that was true. I changed a few lines of code and
now everything works as expected.

I also set the cell text in the willDisplayCell method, but I was
setting that every time. Which explains why the name was always
correct.

Thanks again.

On May 26, 2004, at 3:14 PM, Chris Ridd wrote:

> On 26/5/04 8:04 pm, John Randolph <email@hidden> wrote:
>
>> Brian,
>>
>> NSOutlineView, like NSTableView, has exactly one cell per column,
>> which
>> is re-used to draw each row. Why did you choose NSBrowserCell for
>> this?
>>
>> -jcr
>
> It seems like a good choice for an outline view where each item can
> contain
> an icon next to a label. I've successfully used it (to display entries
> from
> an LDAP directory) and the only trick was that you unsurprisingly
> *must* set
> the cell's image every time. Brian seems to have noticed that too,
> judging
> from his posted code.
>
> Brian, are you sure your delegate's method is being called?
>
> Cheers,
>
> Chris
>
Brian Bergstrand <http://www.bergstrand.org/brian/>, AIM: triryche206
PGP Key: <http://www.bergstrand.org/brian/misc/public_key.txt>
First law of debate: Never argue with a fool. People might not know the
difference.
As of 03:49:23 PM, iTunes is playing "The Right Side Of My Mind" from
"Q2K" by "Queensrche"

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQLT4EHnR2Fu2x7aiEQL/GACglBVreKDB3Qn9eLHiyasBFh8xjywAoKdP
drylIYQWKUpei1OK2CBhpEGo
=ccIJ
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: NSOutlineView, NSBrowserCell and Images (From: Chris Ridd <email@hidden>)

  • Prev by Date: Aaron's Cocoa Programming for Mac OS X 2nd Edition reviewed...
  • Next by Date: "Manually" saving NSTableView info
  • Previous by thread: Re: NSOutlineView, NSBrowserCell and Images
  • Next by thread: How far with accessors?
  • Index(es):
    • Date
    • Thread