• 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: Editing NSTableViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing NSTableViews


  • Subject: Re: Editing NSTableViews
  • From: matt neuburg <email@hidden>
  • Date: Sat, 19 Jul 2003 09:12:42 -0700

On Thu, 17 Jul 2003 10:13:49 -0700, The Amazing Llama <email@hidden>
said:
>I was implementing an NSTableView, and I needed a button to add an
>entry to the table and set it up to be edited.
>
>So I found the method
>
> [categoryTable editColumn:1 row:newRow withEvent:nil select:YES];
>
>And I went about using it. Then I got an error:
>
> Invalid parameter not satisfying: _lastSelectedRow == row
>
>Interesting. So I changed my code to:
>
> [categoryTable selectRow:newRow byExtendingSelection:NO];
> [categoryTable editColumn:1 row:newRow withEvent:nil select:YES];
>
>And it works fine. It wasn't that hard to figure out, but:
> 1) I couldn't find an answer in the mailing list archive, so I wanted
>to put one there
> 2) Why doesn't the method just select the row by itself? Why do I need
>to do that for it?

The docs say very clearly and loudly:

"The row at rowIndex must be selected prior to calling
editColumn:row:withEvent:select:, or an exception
will be raised."

So what's the problem? The command does what the docs say it does. Is the
"amazing" feature of this llama the fact that it doesn't know how to read
the manual? m.

--------
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Running Java/Obj-C code with NSAppleScript
  • Next by Date: Re: Interfacing with the Real Player or Windows Media?
  • Previous by thread: Editing NSTableViews
  • Next by thread: Pass command line arguments to the app?
  • Index(es):
    • Date
    • Thread