• 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
Fastest way to "ExpandAll" in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fastest way to "ExpandAll" in NSOutlineView


  • Subject: Fastest way to "ExpandAll" in NSOutlineView
  • From: Sanford Selznick <email@hidden>
  • Date: Mon, 5 Jun 2006 20:46:47 -0700

I'd like to expand-/collapse-all cells in an NSOutlineView programmatically. The code below runs fine, but is slow once there are more than a few hundred rows in the NSOutlineView.

for (int c = 0; c < [ov numberOfRows]; c++) {
	id item = [ov itemAtRow:c];
	if (expand) {
		[ov expandItem:item];
	}
	else {
		[ov collapseItem:item];
	}
}

Any ideas how to make it faster?

Some things I know that might help: I know how many rows there will be before and after expand/collapse.

Thank you,
  Sanford
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Fastest way to "ExpandAll" in NSOutlineView
      • From: Corbin Dunn <email@hidden>
    • Re: Fastest way to "ExpandAll" in NSOutlineView
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: is [[NSObject alloc] release] correct?
  • Next by Date: Re: stringWithContentsOfURL: usedEncoding: error:
  • Previous by thread: Re: is [[NSObject alloc] release] correct?
  • Next by thread: Re: Fastest way to "ExpandAll" in NSOutlineView
  • Index(es):
    • Date
    • Thread