Re: Stop editing a table cell
Re: Stop editing a table cell
- Subject: Re: Stop editing a table cell
- From: Darrin Cardani <email@hidden>
- Date: Mon, 24 Nov 2003 13:03:09 -0600
As usual, 10 seconds after I sent the message, I figured out the answer. :-P
At 9:54 AM -0800 11/24/03, Darrin Cardani <email@hidden> wrote:
I have a table that has editable text in it. There's a popup menu
that allows the user to switch the data displayed in the table to
another language. If they are in the middle of editing a cell, and
change the value in the popup, I want to first accept the text they
were editing, then switch to showing the data in the other language.
Looking through the docs, it appears that I need to get the table
column that's being edited, get its dataCell, then send the dataCell
the endEditing: message. The problem is I don't know what to pass as
the textObj parameter.
What I ended up doing was registering to receive the table's
NSControlTextDidBeginEditingNotification. When I get that, I get the
userInfo dictionary from the notification object, and get the object
for the "NSFieldEditor" key. That's the text object that is doing the
editing, and which I can send to the dataCell's endEditing: method.
Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<
http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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.