• 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 - Automatically select newly added item - Help needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView - Automatically select newly added item - Help needed


  • Subject: Re: NSOutlineView - Automatically select newly added item - Help needed
  • From: Mario Kušnjer <email@hidden>
  • Date: Tue, 6 Oct 2009 18:43:36 +0200

Again me !
Just a little update !
I packed previous code in combined message calls.
Here's how it looks now:

if ([lsOutlineView selectedRow] < 0)
{
Parent *parent = [Parent new]; <--- create new Parent object
[sourceListLevelZero addObject:parent]; <--- add newly created Parent object to root array
[lsOutlineView reloadItem:nil reloadChildren:YES];
[lsOutlineView expandItem:nil expandChildren:YES];
[lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex: [lsOutlineView rowForItem:parent]] byExtendingSelection:NO]; <--- select row according to index from indexSet created with row index of outline view for item - parent
[parent release]; <--- release Parent object
}


Again this works fine.
Ok, that's it.
Bye !


Mario Kušnjer email@hidden +385957051982 mariokusnjer@skype

_______________________________________________

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


References: 
 >NSOutlineView - Automatically select newly added item - Help needed (From: Mario Kušnjer <email@hidden>)
 >Re: NSOutlineView - Automatically select newly added item - Help needed (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: NSLayoutManager and best override point for temporary attributes
  • Next by Date: Triggering a Method when a Core Data Property is Altered.
  • Previous by thread: Re: NSOutlineView - Automatically select newly added item - Help needed
  • Next by thread: How to check if a class derives from another?
  • Index(es):
    • Date
    • Thread