mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:11:18 +00:00
Change rows to views
This commit is contained in:
parent
ae3c4fbee5
commit
fd8533fab9
1 changed files with 6 additions and 6 deletions
|
@ -279,7 +279,7 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (instancetype) initWithViews: (NSArray *)rows // an array of arrays
|
||||
- (instancetype) initWithViews: (NSArray *)views // an array of arrays
|
||||
{
|
||||
self = [self initWithFrame: NSZeroRect];
|
||||
|
||||
|
@ -288,18 +288,18 @@
|
|||
|
||||
if (self != nil)
|
||||
{
|
||||
NSUInteger rc = [rows count], cc = 0;
|
||||
NSUInteger rc = [views count], cc = 0;
|
||||
|
||||
if (rc > 0)
|
||||
{
|
||||
cc = [[rows objectAtIndex: 0] count];
|
||||
cc = [[views objectAtIndex: 0] count];
|
||||
}
|
||||
|
||||
_cells = [[NSMutableArray alloc] initWithCapacity: rc * cc];
|
||||
_rows = [[NSMutableArray alloc] initWithCapacity: rc];
|
||||
_columns = [[NSMutableArray alloc] initWithCapacity: cc];
|
||||
|
||||
FOR_IN(NSArray*, row, rows)
|
||||
FOR_IN(NSArray*, row, views)
|
||||
{
|
||||
NSArray *columns = [row objectAtIndex: c];
|
||||
FOR_IN(NSArray*, column, columns)
|
||||
|
@ -357,9 +357,9 @@
|
|||
return [self gridViewWithViews: rows];
|
||||
}
|
||||
|
||||
+ (instancetype) gridViewWithViews: (NSArray *)rows
|
||||
+ (instancetype) gridViewWithViews: (NSArray *)views
|
||||
{
|
||||
return AUTORELEASE([[self alloc] initWithViews: rows]);
|
||||
return AUTORELEASE([[self alloc] initWithViews: views]);
|
||||
}
|
||||
|
||||
- (NSInteger) numberOfRows
|
||||
|
|
Loading…
Reference in a new issue