• 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 retention of items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView retention of items


  • Subject: Re: NSOutlineView retention of items
  • From: Dan Waylonis <email@hidden>
  • Date: Fri, 1 Mar 2002 18:49:53 -0800

On Friday, March 1, 2002, at 03:08 PM, john terranova wrote:

> I'm a long time programmer, new to Cocoa. I have an IBAction
> to delete an
> item in an NSOutlineView, which is basically this:
>
> - (IBAction)deleteRow:(id)sender
> {
> id rwItem = [m_tbl itemAtRow:[m_tbl selectedRow]];
>
> if (rwItem != nil)
> {
> [m_tbl collapseItem: rwItem collapseChildren:YES];
> [rwItem release];
> [m_tbl reloadData];
> }
> }
>
> I eventually figured out using ObjectAlloc that expanded items in
> NSOutlineView get retained. The only way to remove an expanded
> item from
> the table is to first collapse the item, then release the item
> so that my
> dataSource won't find it anymore.
>
> Without the collapseItem, the item does not appear to be
> dealloc'd until the
> table is dealloc'd, which may be a long time later.
>
> Is this the proper way to remove (expanded) items from
> NSOutlineView, or am
> I missing something?

Hi John,

It's a known (to Apple) AppKit bug.

You have to make sure that all outline view items are collapsed
when you're done with the view.

Dan
__________________________________________________________________
Dan Waylonis email@hidden
Software Engineer http://www.nekotech.com
nekotech SOFTWARE 650.964.2490 (O)
_______________________________________________
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: 
 >NSOutlineView retention of items (From: john terranova <email@hidden>)

  • Prev by Date: Re: Ejecting disks
  • Next by Date: Cocoa HTTP POST?
  • Previous by thread: NSOutlineView retention of items
  • Next by thread: Ejecting disks
  • Index(es):
    • Date
    • Thread