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

Fwd: NSOutlineView, NSBrowserCell and Images


  • Subject: Fwd: NSOutlineView, NSBrowserCell and Images
  • From: Brian Bergstrand <email@hidden>
  • Date: Wed, 26 May 2004 11:18:34 -0500

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

I posted this on Mac OS X Dev a few days ago, and received no response.
Can anyone here help?

Thanks.

Begin forwarded message:
>
> Hi all,
>
> I have an Outline view that uses NSBrowserCell as the cell prototype. I
> have one problem with this, it seems as though the outline view is
> sharing a single cell -- at least for the image portion of the cell.
> All of my entries end up sharing the same icon, when they should have
> different icons. The entry names as correct (ie not shared), but the
> icons are not.
>
> I set the table up as follows in my init method:
>
> [[outline tableColumnWithIdentifier:@"col1"]
> setDataCell:[[[NSBrowserCell alloc] init] autorelease]];
>
> And then in the willDisplayCell delegate method, I set the icon for
> each item.
>
> - - (void)outlineView:(NSOutlineView *)outlineView
> willDisplayCell:(id)cell
> forTableColumn:(NSTableColumn *)tableColumn item:(id)item
> {
> // determine correct icon
> [cell setImage:icon];
> //
> }
>
> This works the first time through, but as soon as the view needs to
> redraw items, all cells change to the icon of the very last cell set.
>
> Anyone have any ideas?
>
> Thanks.
>
Brian Bergstrand <http://www.bergstrand.org/brian/>, AIM: triryche206
PGP Key: <http://www.bergstrand.org/brian/misc/public_key.txt>
Like ex-Pres Clinton, Microsoft has a teflon coating. Fascinating, and
disturbing. - IronChef (no not THE Iron Chef)


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

iQA/AwUBQLS1UnnR2Fu2x7aiEQJitACeMXnEG48eaBrgLKSTxMo35OtjLf4An10L
tOhGPdY9EhhRycLlxFTsr2Zl
=6ovl
-----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.


  • Follow-Ups:
    • Re: NSOutlineView, NSBrowserCell and Images
      • From: John Randolph <email@hidden>
  • Prev by Date: Re: NSComboBox and bindings
  • Next by Date: Re: Cocoa Rules
  • Previous by thread: Re: C++ structs in .mm file
  • Next by thread: Re: NSOutlineView, NSBrowserCell and Images
  • Index(es):
    • Date
    • Thread