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 (Cocoa-dev@lists.apple.com)

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