Re: Making a text cell in a table editable
Re: Making a text cell in a table editable
- Subject: Re: Making a text cell in a table editable
- From: "Vitaly Ovchinnikov" <email@hidden>
- Date: Thu, 10 Jul 2008 01:13:57 +0400
In my case I just use [grid selectedRow], because NSTableView selects
new row for me. Thanks, will try your method too.
On Thu, Jul 10, 2008 at 12:49 AM, I. Savant <email@hidden> wrote:
>> Same goes for -add: ... You'll need to force the array controller to
>> -rearrangeObjects before asking the tableView to reload. If you're
>> using Core Data, you'll probably also need to force a -fetch: before
>> calling -rearrangeObjects, though I don't know for sure.
>>
>> This forces the array controller to do its thing right then and
>> there. Of course short-circuiting the mechanism like that can cause
>> validation problems, so be careful ...
>
> Sorry! I'm not thinking straight ... you will need to directly use
> the -addObject: and -insertObject:atArrangedObjectIndex: methods
> rather than -insert: or -add: for the above to work. This takes affect
> immediately (but must still be rearranged via -rearrangeObjects).
>
> Also, you need to use the index of the newly-inserted object in the
> array controller's -arrangedObjects array, not its contents (so you
> get the correct row to edit in the table).
>
> --
> I.S.
>
_______________________________________________
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