• 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: Colin Howarth <email@hidden>
  • Date: Tue, 6 Oct 2009 02:49:12 +0200

On 6 Oct, 2009, at 01:44, Mario Kušnjer wrote:
...

[lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex: [lsOutlineView rowForItem:[Parent new]]] byExtendingSelection:NO];

It is the last line that trouble's me.
It should select newly added item in the list (right ?), but it does not !

without trying to understand what's happening, or supposed to, you could also (in cases like this) try TEMPORARILY unravelling your method calls. Like this:


Parent *parent = [Parent new];

int index = [lsOutlineView rowForItem: parent];

NSArray *indices = [NSIndexSet indexSetWithIndex: index];

[IsOutlineView selectRowIndexes: indices byExtendingSelection:NO];


<< where I don't know what the actual classes are >>


Then you can check these intermediate steps, to see they're doing what you think they should.


Then you can wrap it all up again once you've fixed it, to save screen space :-)

--colin_______________________________________________

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


  • Follow-Ups:
    • Re: NSOutlineView - Automatically select newly added item - Help needed
      • From: Charles Srstka <email@hidden>
References: 
 >NSOutlineView - Automatically select newly added item - Help needed (From: Mario Kušnjer <email@hidden>)

  • Prev by Date: Re: wait for the event?
  • Next by Date: Re: NSOutlineView - Automatically select newly added item - Help needed
  • Previous by thread: Re: NSOutlineView - Automatically select newly added item - Help needed
  • Next by thread: Re: NSOutlineView - Automatically select newly added item - Help needed
  • Index(es):
    • Date
    • Thread