Core Data Insert and editColumn:row:withEvent:select:
Core Data Insert and editColumn:row:withEvent:select:
- Subject: Core Data Insert and editColumn:row:withEvent:select:
- From: SA Dev <email@hidden>
- Date: Fri, 7 Oct 2005 09:18:35 -0400
List:
I have a Core Data app with a table listing "Foo" entity instances
(using bindings). Foo has a -title attribute. When a new Foo instance
is inserted, I would like the table to begin editing the title column
immediately for renaming. The challenge is that the table is in
another nib separate from the document's nib and new Foo instances
are added in an action in my NSDocument subclass.
I've tried catching
NSManagedObjectContextObjectsDidChangeNotification and getting the
inserted objects set, then calling -editColumn:row:withEvent:select:,
but I ended up having to brute-force updating the table for the row
to even be there. This works randomly. The times it doesn't work, the
cell goes into edit mode for a split second, then another row is
selected ... Someone on cocoadev.com suggested setting a zero-
interval timer to get past the current run loop (worth a try), but I
get the same results. I realize it's all a matter of timing and that
I'm probably fighting the bindings architecture.
What's the best way to accomplish this? I know something similar
to this was discussed here: http://www.cocoabuilder.com/archive/
message/cocoa/2005/9/6/145831
... the fact that I'm doing this in a separate nib seems to make
all the difference as the example given above doesn't work for me.
Any help would be most appreciated.
- SADev
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden