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
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
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
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
> 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
> - (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
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
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
{
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
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
10 matches
Mail list logo