• 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
Starting editing for a Row as soon as it is Added. (More Detail)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Starting editing for a Row as soon as it is Added. (More Detail)


  • Subject: Starting editing for a Row as soon as it is Added. (More Detail)
  • From: Joshua Garnham <email@hidden>
  • Date: Wed, 19 Aug 2009 17:31:39 +0000 (GMT)

Hi There,

I have an NSOutlineView and what I want to happen is that when a row is
added I want the row that has been added to Start Editing immediately
like when you double click on a row.

I have had a go using the code below (but as I'm not that Confident with Cocoa) it did not work.

- (IBAction)add:(id)sender {
    [treeController add:@"New Item"];
    [outlineView rowForItem:(id)@"New Item"];
    [outlineView editColumn:0 row:1 withEvent:nil select:YES];
}

The action is connected to the Add button in the Outline View.

The line ->    [outlineView rowForItem:(id)@"New Item"];
Is supposed to give the row number of the added row to the next line
->    [outlineView editColumn:0 row:1 withEvent:nil select:YES];
instead of the number 1.
So what I am supposed to replace @"New Item" with in Lines 1 and 2 and make it do the above?

Thanks,
Josh.




_______________________________________________

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: Starting editing for a Row as soon as it is Added. (More Detail)
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Get size of folder
  • Next by Date: Re: Over Riding Print Function in Cocoa PDE Plugin
  • Previous by thread: Re: NSFetchedResultsController with custom NSSortDescriptor
  • Next by thread: Re: Starting editing for a Row as soon as it is Added. (More Detail)
  • Index(es):
    • Date
    • Thread