Re: Making a text cell in a table editable

2008-07-10 Thread Vitaly Ovchinnikov
I though about sorting, need to try that you wrote. Thank you. On Thu, Jul 10, 2008 at 12:08 PM, Abizer Nasir <[EMAIL PROTECTED]> wrote: > Try this. > > Run your application and create a sort on one of the columns (by clicking in > the header). Now add your new items. Regardless of your sorting, t

Re: Making a text cell in a table editable

2008-07-10 Thread Abizer Nasir
Try this. Run your application and create a sort on one of the columns (by clicking in the header). Now add your new items. Regardless of your sorting, the new items will appear at the end of the table view. Now. Add the call to rearrangeObjects: and when you add the new item. It will app

Re: Making a text cell in a table editable

2008-07-09 Thread Vitaly Ovchinnikov
I replaced my code with this one: MyObject *p = [[MyObject alloc] init]; [arrayController addObject:p]; [p release]; [grid editColumn:0 row:[grid selectedRow] withEvent:nil selected:YES]; it works fine, NSTableView selects new row, -editColumn receives correct row number and starts editing. So, t

Re: Making a text cell in a table editable

2008-07-09 Thread Vitaly Ovchinnikov
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 PROTECTED]> wrote: >> Same goes for -add: ... You'll need to force the array controller to >> -rearrangeObjects before asking

Re: Making a text cell in a table editable

2008-07-09 Thread I. Savant
> 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 c

Re: Making a text cell in a table editable

2008-07-09 Thread I. Savant
> - (void) onAdd: (id) sender > { >[arrayController insert:self]; // creates new object > >[tableView reloadData]; // <-- make table view reload it's data > >[tableView editColumn:...]; // maybe table view now knows about the new > row? > } This probably won't work as expected becaus

Re: Making a text cell in a table editable

2008-07-09 Thread Jens Miltner
Am 9.7.08 um 22:05 schrieb Vitaly Ovchinnikov: I have a similar question. My NSTableView is bound to NSArrayController and I need to make cell editable immediately after adding new row. Rows added with default values and I need to allow user to edit them easy. I have an "Add" button that fires

Re: Making a text cell in a table editable

2008-07-09 Thread Vitaly Ovchinnikov
I have a similar question. My NSTableView is bound to NSArrayController and I need to make cell editable immediately after adding new row. Rows added with default values and I need to allow user to edit them easy. I have an "Add" button that fires action like this: - (void) onAdd: (id) sender {

Re: Making a text cell in a table editable

2008-07-09 Thread Jens Miltner
Am 09.07.2008 um 08:09 schrieb Chris Idou: How do I programmatically make a text cell in a NSTableView to have focus and be in edit mode? I believe -[NSTableView editColumn:(NSInteger)columnIndex row: (NSInteger)rowIndex withEvent:(NSEvent *)theEvent select:(BOOL)flag] is the method you

Making a text cell in a table editable

2008-07-08 Thread Chris Idou
How do I programmatically make a text cell in a NSTableView to have focus and be in edit mode? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderat