Adding a new row to NSTableView dynamically using bindings
Adding a new row to NSTableView dynamically using bindings
- Subject: Adding a new row to NSTableView dynamically using bindings
- From: "vibhatha v" <email@hidden>
- Date: Sun, 22 Jul 2007 20:44:51 +0530
Hi,
I am trying to add a new row to an NSTableview dynamically through code.
I am using bindings to populate my tableview.
My tableview is associated with an entity set.
Now, when i try to add a new row, if entity set is initially empty, then the
below mentioned code, adds a new row is to the tableview,
but, this new row is not appended to the entity set.
Please let me know where i have gone wrong.
I need to add a new entry to my entity set too whenever a new row is added
to the tableview.
Please find below the code:
Class newObjClass=[resultList entityClass];
ISTModelBase *newObj=[[newObjClass alloc] init];
[newObj setModifiable:YES];
[newObj setModified:YES];
[myArrayController addObject:newObj];
[myTableView selectRow:[myTableView numberOfRows]-1
byExtendingSelection:NO];
[myTableView editColumn:0 row:[plantTableView numberOfRows]-1
withEvent:nil select:YES];
myTableView is the tableview and resultList is the entity set.
Regards,
Vibhatha.
_______________________________________________
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