* Source/NSCollectionView.m (-tile): Prevent _numberOfColumns

from being 0.
        * Source/NSArrayController.m: Revert last change and add proper
        handling of arrangeObjects for many cases.
        * Source/NSCollectionViewItem.m: Fix reference counting. Add
        method -view to have something to display.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38387 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2015-03-08 22:23:06 +00:00
parent 954ab51922
commit f54ce64d99
4 changed files with 89 additions and 19 deletions

View file

@ -88,10 +88,7 @@
- (void) setTextField: (NSTextField *)aTextField
{
if (textField != aTextField)
{
textField = aTextField;
}
ASSIGN(textField, aTextField);
}
- (NSImageView *) imageView
@ -101,10 +98,14 @@
- (void) setImageView: (NSImageView *)anImageView
{
if (imageView != anImageView)
{
imageView = anImageView;
}
ASSIGN(imageView, anImageView);
}
- (NSView *) view
{
// FIXME
[[self textField] setStringValue: [self representedObject]];
return [self textField];
}
- (id) initWithCoder: (NSCoder *)aCoder
@ -114,13 +115,27 @@
{
if (YES == [aCoder allowsKeyedCoding])
{
textField = [aCoder decodeObjectForKey: @"textField"];
imageView = [aCoder decodeObjectForKey: @"imageView"];
if ([aCoder containsValueForKey: @"textField"])
{
[self setTextField: [aCoder decodeObjectForKey: @"textField"]];
}
else
{
textField = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 100.0, 20.0)];
}
if ([aCoder containsValueForKey: @"imageView"])
{
[self setImageView: [aCoder decodeObjectForKey: @"imageView"]];
}
else
{
imageView = [[NSImageView alloc] initWithFrame: NSMakeRect(0.0, 0.0, 100.0, 100.0)];
}
}
else
{
textField = [aCoder decodeObject];
imageView = [aCoder decodeObject];
[self setTextField: [aCoder decodeObject]];
[self setImageView: [aCoder decodeObject]];
}
}
return self;