caching NSCollectionView
caching NSCollectionView
- Subject: caching NSCollectionView
- From: Georg Seifert <email@hidden>
- Date: Mon, 23 Jun 2008 22:05:10 +0200
Hello again,
I have an other question:
Does anybody got saving the item views working. I filed a but at apple
about this but i was curios if anyone found a workaround.
the problem is, that the stored NSCollectionViewItem does not retains
the view:
in my NSCollectionView subclass:
- (NSCollectionViewItem *)newItemForRepresentedObject_:(id)object {
myCollectionViewItem* item = [(myClass*)object item];
if (item == nil) {
item = (myCollectionViewItem*)[super
newItemForRepresentedObject:object];
[(myClass*)object setItem:item];
[(myClass*)object setItemView:(myView*)item.view];
} else {
[item retain];
[item setRepresentedObject:object];
[item setView:[object itemView]];
}
NSLog(@"newItemForRepresentedObject:%@ layoutView: %@", item, [item
layoutView]);
return item;
}
in the log I get something like this:
<NSCollectionViewItem: 0xd655e50>{represented object: (null), view:
(null) (frame {{-1.99813, 2.29293e-39}, {4.2039e-45, 3.36312e-44}}),
selected: NO}
Does anyone has an idea?
Thanks for all your help.
Georg
_______________________________________________
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