OK, I think I understand what you want to do now. You want to retrieve the one set of values and then filter them based on their individual values. Am I understanding right now? If this is what you want to do then I am afraid you cannot do this in interface builder. You would need to do this programatically. I know it is long winded but this is my suggestion:
Create an object like so:

@interface MyObject : NSObject
{
        NSManagedObjectContext *moc;
        NSArray *contents;
        NSMutableArray *filteredContents;
}
- (id)init;
@end

@implementation MyObject

-(id)init
{
        self = [super init]
        if(self)
        {
moc = [[NSApp delegate] managedObjectContext]; //if this is where it is... NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"FavoriteWebsites" inManagedObjectContext:moc];
                [request setEntity:entity];
                NSError *error = nil;
content = [managedObjectContext executeFetchRequest:request error:&error];

                //Then you need to filter the results into your new array...

                filteredContents = [[NSMutableArray alloc] initWithCapacity:1];
                [filteredContents addObject:([contents objectAtIndex:0]) ];
                int contentCount = [contents count];
                BOOL indenticleValueExists = FALSE;
                for(int firstIndex = 0; index <= (contentCount - 1); index++)
                {
                        filteredCount = [filteredContents count];

for(int secondIndex = 0; secondIndex <= (filteredCount - 1); secondIndex++)
                        {
NSString *one = [[filteredContents objectAtIndex:secondIndex] valueForKey@"url"]; NSString *two = [[contents objectAtIndex:firstIndex] valueForKey@"url"];;

                                if([one compare:two] == 0)
                                        identicleValueExists = TRUE;
                        }
                        if(identicleValueExists != TRUE)
[filteredContents addObject:([contents objectAtIndex: firstIndex]) ];
                }
        }
        return self;
}
@end

then in IB create a array controller and connect its content to this object. Then you can bind a table to the new array controller and the values in it will all be unique. If this is not what you want at all then I'm sorry if I have gone off on a tangent.

Phil.


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to