• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
caching NSCollectionView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: caching NSCollectionView
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Custom mouse cursor in NSTextView
  • Next by Date: Re: caching NSCollectionView
  • Previous by thread: Re: Learning SQLite by watching Core Data?
  • Next by thread: Re: caching NSCollectionView
  • Index(es):
    • Date
    • Thread