• 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
OutlineView please remember you selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OutlineView please remember you selection


  • Subject: OutlineView please remember you selection
  • From: "Adam Gerson" <email@hidden>
  • Date: Sun, 30 Mar 2008 03:13:15 -0400

I have an OutlineView bound to an NSTreeController. I would like to
set the selected row of the OutlineView at the applications launch to
the second row. It defaults to the first. I have tried many
combination of the code below to no avail. If I trigger the code from
a button it works just fine. Something happens at launch time to
override these commands. Sometimes at app launch it even chooses the
second row and then I see it switch back to the first row before my
eyes. I have tried this code in awakeFromNib and
applicationDidFinishLaunching.


NSError *error;
[treeController fetchWithRequest:nil merge:NO error:&error];

[treeController setSelectionIndexPath:[NSIndexPath indexPathWithIndex:1]];

[outlineView selectRow:1 byExtendingSelection:NO];
_______________________________________________

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: outlineViewSelectionDidChange not called
  • Next by Date: Re: machine with null serial number?
  • Previous by thread: Flickering in NSTableView with Core Animation
  • Next by thread: [Apple Example] NSOutlineView
  • Index(es):
    • Date
    • Thread