Mailing Lists: Apple Mailing Lists

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

(no subject)



Ok... I'm at a loss. I have never once gotten an in table drag and drop to work. Either when you move things up they go too far up or if you move them down they drop one row lower than expected. In the case of this current application after moving more than a single file down if you try to move anything else down it will drop all the way to the bottom of the list.. here is the drop code i am using. The drop operation is dropabove because when I try drop on i cannot drag from the desktop

		
            NSArray* nodes = [dragDataSource draggedNodes];
			NSEnumerator * iter = [nodes objectEnumerator];
			NodeItem * item, * mainParent;
			NSMutableArray * newArray =[[NSMutableArray alloc]init];
			NSMutableArray * temp = [[NSMutableArray alloc]init];
			mainParent = [[draggedNodes objectAtIndex:0]parent];
			while(item =[iter nextObject]){
				[mainParent removeChild:item];
				[temp addObject:item];
				}//end while
			[newArray addObjectsFromArray:[mainParent children]];
			iter = [temp reverseObjectEnumerator];
			NodeItem * thisItem;
			if(idx > [[mainParent children]count]){
				idx = [[mainParent children]count];
				}
			while(thisItem =[iter nextObject]){
				[newArray insertObject:thisItem atIndex:idx];
				}
			[mainParent setChildren:newArray];
			[joinOutline reloadData];
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to 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.