NSArrayController insertObject:atArrangedObjectIndex: not working as expected
NSArrayController insertObject:atArrangedObjectIndex: not working as expected
- Subject: NSArrayController insertObject:atArrangedObjectIndex: not working as expected
- From: "douglas a. welton" <email@hidden>
- Date: Sat, 7 Jan 2006 21:08:16 -0500
Hi All,
I have run into an issue where the results that I am getting when I
use -insertObject:atArrangedObjectIndex: in my NSArrayController do
not match up with what I expect.
My application uses a subclass of NSArrayController to manage an
NSArray that represents the clips in a video library. I use -
setPredicateFilter: when displaying the clips for an individual
Playlist in my clips table. This works as expected.
My problem arises when i accept new clips into my Playlist using my
drag'n'drop routines. When a user drags a movie from the Finder onto
my clip table, I create a New_Clip object and use -
insertObject:atArrangedObjectIndex: to insert the New_Clip at the
Target_Row.
What I notice is that -insertObject:atArrangedObjectIndex: inserts
the New_Clip in the correct position of the NSArray returned by [self
arrangedObjects]... However, the New_Clip is appended at the end of
the NSArray returned by [self content].
What I want is for the New_Clip to be placed in the correct place in
both the arrangedObjects array and the content array. Is this a case
where I need to subclass -insertObject:atArrangedObjectIndex:?
thanks,
douglas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden