Le 12 avr. 2010 à 23:17, Quincey Morris a écrit :
> 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
Le 12 avr. 2010 à 22:22, Kyle Sluder a écrit :
> On Mon, Apr 12, 2010 at 12:12 PM, vincent habchi wrote:
>> 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 th
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
On Mon, Apr 12, 2010 at 12:12 PM, vincent habchi wrote:
> 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, t
Quincey,
thanks a lot
> Surely it would be more robust to make the order explicit in your data model
> (with a transient property if the order really is transient) and let the
> array controller keep the displayed content sorted according to that order?
Sure, I could do that. In fact I have do
On Apr 12, 2010, at 10:14, vincent wrote:
> I did try to insert the moved object in another array *before* deleting and
> reinserting it (and then deleting it from the other array). AFAIK, inserting
> an object in a NSArray retains it. TO no avail.
Ah, ok, sorry -- trying the easiest answer fir
Quincy,
(sorry for the double answer)
> This is likely NOT a Core Data question. Most likely you're not doing your
> memory management quite correctly. Look here under the heading "Mutable
> Arrays":
>
>
> http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Collections/
On Apr 12, 2010, at 08:15, vincent habchi wrote:
> I'd like to change the place of a NSManagedObject stored in a
> NSArrayController in entity mode (after a drag'n drop operation). I didn't
> find any suitable primitive, so I decided to go something like
> "removeAtSomeIndex" and then immediate
Hi again!
I'd like to change the place of a NSManagedObject stored in a NSArrayController
in entity mode (after a drag'n drop operation). I didn't find any suitable
primitive, so I decided to go something like "removeAtSomeIndex" and then
immediately after "insertAtSomeOtherIndex".
However, it