Re: NSCollectionView Subclass difficulties
Re: NSCollectionView Subclass difficulties
- Subject: Re: NSCollectionView Subclass difficulties
- From: Jens Alfke <email@hidden>
- Date: Sun, 10 Feb 2008 19:41:36 -0800
On 10 Feb '08, at 7:31 PM, Jaime Magiera wrote:
if([[[object header] objectForKey:@"type"] isEqualToString:@"Video"])
{
[videoPrototype setRepresentedObject:object];
return videoPrototype;
} else {
[genericPrototype setRepresentedObject:object];
return genericPrototype;
}
You're returning the same object every time. The method should, as its
name implies, return a new object every time it's called. You can
either make a fresh copy of a prototype object, or use alloc/init to
create a new one.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden