(no subject)
(no subject)
- Subject: (no subject)
- From: Development <email@hidden>
- Date: Tue, 22 May 2007 20:58:07 -0700
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:
This email sent to email@hidden