• 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: Edit Newly Inserted Row Via Bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Edit Newly Inserted Row Via Bindings


  • Subject: Re: Edit Newly Inserted Row Via Bindings
  • From: "Ian G. Gillespie" <email@hidden>
  • Date: Wed, 15 Jun 2005 09:09:37 -0400

If you use a custom array controller and provide an outlet to the
table view, you could also override addObject:

- (void)addObject:(id)object

{
     [super addObject:(id)object];
     [tableView editColumn:0
                       row:[self selectionIndex]
                 withEvent: nil
                    select: YES];
}
This seems to work well but I ran into an issue with sort descriptors. I am using a tree controller and when I use addObject: and the user has selected one of the columns for sorting, the newly added object gets re-arranged into the right location, but the selection remains on the last object in the list, even if it wasn't the one just added. I have preserves selection marked in IB for the tree controller. How do I get the just-added object to keep the selection?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Creating a subclass of an *unknown* object
  • Next by Date: Re: Missing dockMenu Outlet
  • Previous by thread: Re: Edit Newly Inserted Row Via Bindings
  • Next by thread: Resizing a WebView
  • Index(es):
    • Date
    • Thread