On Apr 12, 2010, at 12:12, vincent habchi wrote:

> Sure, I could do that. In fact I have done it: This order is not a property 
> of the inserted object, but of one liked therewith. But tell me, would 
> drag-and-drop work by just rearranging an object ID?
> 
> Besides, the proxy solution has one advantage: since the object in the 
> NSArrayController reacts to actions performed on buttons linked to it, I 
> think it is better to have code in the proxy object rather than on the 
> NSManaged one, that gets overwritten every time I alter it, even slightly. 
> What do you think?

I think I'm confused now about what scenario we are talking about. Are you 
saying that the object you insert with [NSArrayController insertObject...] is 
*not* a NSManagedObject, but is a proxy object that is linked to the 
NSManagedObject? Or are you referring to the NSArrayController itself as a 
proxy object?

I also don't understand what "the object in the NSArrayController reacts to 
actions performed on buttons linked to it" means. There aren't any objects "in" 
a NSArrayController. Or do you mean the NSArrayController instance itself has 
buttons linked to it?

And I also don't understand what's being "overwritten". Do you mean the Core 
Data persistent store?

I've got a feeling that what you're trying to do is put an "ordered containment 
layer" (a sorted NSArray, basically) between the Core Data NSSet in your data 
model and the NSArrayController. If so, I think that's perfectly fine, but it 
should be part of your data model, and you can't just use the NSArrayController 
for the purpose.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to