Hi Kyle et. al. On network refreshes, rebuild an entire temp array from an xml blob all over again to include changes to individual items in the array. They are an array of NSMutableDictionary. This is not ideal, I know but not sure of a cleaner solution.
yes, I created an NSArrayController that binds to gridContent NSArray(a @property). [gridContentController bind:@"contentArray" toObject:self withKeyPath:@"gridContent" options:nil]; In IB, like you suggest, I set the Content binding of the collectionview to *gridContentController.arrangedObjects *the dimming/brighening seems to persist. Am I initializing the binding correctly? just for the heck of it, I subclassed NSCollectionView and overrode -setContent: like this: - (void)setContent:(NSArray *)content { [NSAnimationContext beginGrouping]; [[NSAnimationContext currentContext] setDuration:0.0]; [super setContent:content]; [NSAnimationContext endGrouping]; } and this: - (void)setContent:(NSArray *)content { [CATransaction begin]; [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; [super setContent:content]; [CATransaction commit]; } neither seem to improve the situation. I set a breakpoint and it is indeed being called, and repeatedly. Each call to setContent: corresponds with a dimming and brightening in the view, in both situations. On Thu, Nov 10, 2011 at 7:18 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote: > On Thu, Nov 10, 2011 at 3:09 PM, Michael Hanna <taomaili...@gmail.com> > wrote: > > in an nscollectionview, I call setContent: every time I get a new item > for > > the collection view. The annoying side-effect of this is that the whole > > view dims and brightens each time setContent: is called.. not visually > > appealing. > > Are you not reusing items when building the new array? It sounds like > NSCollectionView might be performing a pointer equality test and > creating new collection items for all of the members of the content > array. > > Alternatively, -setContent: could just be very naïve (read: broken) > and always rebuild the entire view when called. In that case, I'd > suggest using the content binding instead. I know that the binding > doesn't have this problem. > > > > > I've tried disabling CATransactions while calling setContent: but that > > seems no change. > > Shot in the dark: after trying the above suggestions, try using > NSAnimationContext instead of CATransaction. NSOutlineView might be > creating explicit CATransactions; the AppKit classes are supposed to > consult the current NSAnimationContext for the values that inform > their explicit CATransactions. > > If calling [[NSAnimationContext currentContext] setDuration:0] doesn't > disable NSCollectionView animations, file a bug. > > --Kyle Sluder > _______________________________________________ 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 arch...@mail-archive.com