• 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
Expanding all Nodes in an NSOutlineView on Load
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Expanding all Nodes in an NSOutlineView on Load


  • Subject: Expanding all Nodes in an NSOutlineView on Load
  • From: "Chris Blunt" <email@hidden>
  • Date: Tue, 23 Oct 2007 14:02:31 +0100

Hi,

I have an NSOutlineView showing sources in the same way as iTunes 7,
which 'header rows' for "Places", "Smart Lists", etc.

On opening a new or previous document, I would like the outlineview to
expand all its nodes. I have written the method to do this, and
checked it works by hooking it up as an IBAction. However, when I call
the method from within one of the two initialisation delegates, e.g:

- (void)windowControllerDidLoadNib:(NSWindowController *)windowController
{
   ...
   [sourcesOutlineView expandAllNodes:nil];
}

- (BOOL)configurePersistentStoreCoordinatorForURL:(NSURL *)url
ofType:(NSString *)fileType error:(NSError **)error
{
   ...
   [sourcesOutlineView expandAllNodes:nil];
}


The expansion doesn't occur. I'm guessing this is because the outline
view hasn't by this time been associated to its NSTreeController data
source.

Does anyone know where I could place the -expandAllNodes call so that
it will be triggered after the nib has been loaded and all the data
sources hooked up?

Thanks in advance!
Chris
--
email@hidden
www.chrisblunt.com
_______________________________________________

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

  • Prev by Date: Re: Thin Windows
  • Next by Date: Re: Drawing Text in spiral shape
  • Previous by thread: Re: Drawing Text in spiral shape
  • Next by thread: Re: Expanding all Nodes in an NSOutlineView on Load
  • Index(es):
    • Date
    • Thread