Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deletes Object on Remove option




On Apr 2, 2006, at 12:59 PM, BK wrote:

Below is the code I'm using. The method moveObjectsInArrangedObjectsFromIndexes is from some Apple sample code for dragging and dropping rows within the same table view, something I'm trying to do. If I use the code below, nothing happens when I drag and drop within the same table view. However, if I comment out setDeletesOnRemove and uncheck "Deletes Object on Remove" in IB, it works! Any hints as to where to look next would be appreciated.

The moveObjectsInArrangedObjectsFromIndexes: method in my example is implemented in a subclass of NSArrayController, so

-(void) moveObjectsInArrangedObjectsFromIndexes:(NSIndexSet*)indexSet toIndex:(unsigned int)insertIndex
{
[self setDeletesOnRemove:timeLineController deletesOnRemove:NO];


would be

-(void) moveObjectsInArrangedObjectsFromIndexes:(NSIndexSet*)indexSet toIndex:(unsigned int)insertIndex
{
[self setDeletesOnRemove:self deletesOnRemove:NO];



When I use your code and substitute that, it works.

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Deletes Object on Remove option (From: email@hidden)
 >Re: Deletes Object on Remove option (From: mmalcolm crawford <email@hidden>)
 >Re: Deletes Object on Remove option (From: BK <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.