Update flow layout. Fix decoding issue with Xib interpretation for NSCollectionViewLayout.

This commit is contained in:
Gregory John Casamento 2022-06-26 08:26:12 -04:00
parent fc56a78840
commit 7fe30c6db2
5 changed files with 9 additions and 2 deletions

View file

@ -3324,6 +3324,10 @@ didStartElement: (NSString*)elementName
{
object = [self decodeObjectForKey: @"primaryBackgroundColor"];
}
else if ([@"NSCollectionViewLayout" isEqualToString: key])
{
object = [self decodeObjectForKey: @"collectionViewLayout"];
}
else if (([@"NSSearchButtonCell" isEqualToString: key]) ||
([@"NSCancelButtonCell" isEqualToString: key]))
{

View file

@ -441,6 +441,7 @@ static NSString *placeholderItem = nil;
{
ASSIGN(_collectionViewLayout, layout);
NSLog(@"layout = %@", layout);
[_collectionViewLayout setCollectionView: self]; // weak reference
[self reloadData];
}

View file

@ -187,6 +187,7 @@
- (NSCollectionViewLayoutAttributes *) layoutAttributesForItemAtIndexPath: (NSIndexPath *)indexPath
{
NSLog(@"Flow layout for index path = %@", indexPath);
return nil;
}

View file

@ -68,6 +68,7 @@
- (void) updateValue: (CGFloat)value forAnimatedKey: (NSCollectionViewTransitionLayoutAnimatedKey)key
{
// not implemented...
}
- (CGFloat) valueForAnimatedKey: (NSCollectionViewTransitionLayoutAnimatedKey)key
@ -76,4 +77,3 @@
}
@end

View file

@ -776,7 +776,8 @@ static Class textFieldCellClass;
self = [super initWithCoder: aDecoder];
if ([aDecoder allowsKeyedCoding])
{
// do nothing for now...
// Set cell to not editable by default...
[_cell setEditable: NO];
}
else
{