Removed all the debugging hooks, re-enabled (and fixed) everything else.

This commit is contained in:
Pietro Gagliardi 2015-08-03 12:47:41 -04:00
parent 70adbf6496
commit 1cdc7d3eb3
4 changed files with 9 additions and 10 deletions

View File

@ -132,7 +132,6 @@
[constraint appendString:@"]"];
}
[constraint appendString:@"|"];
NSLog(@"primary dimension %@", constraint);
[self->v addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:constraint options:0 metrics:nil views:views]];
// TODO do not release constraint; it's autoreleased?
@ -144,7 +143,6 @@ NSLog(@"primary dimension %@", constraint);
constraint = [NSMutableString stringWithString:@"V:|["];
[constraint appendString:tAutoLayoutKey(i)];
[constraint appendString:@"]|"];
NSLog(@"other dimension %@", constraint);
[self->v addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:constraint options:0 metrics:nil views:views]];
// TODO do not release constraint; it's autoreleased?
}

View File

@ -47,6 +47,7 @@
p->attachTop = YES;
p->attachRight = YES;
p->attachBottom = YES;
p->nonStretchyWidthPredicate = @"(==96)"; // TODO verify against Interface Builder
}
- (void)tRelayout

View File

@ -24,11 +24,11 @@ BOOL firstvert = YES;
box = [[tBox alloc] tInitVertical:firstvert spaced:spaced];
/* spinbox = [[tSpinbox alloc] init];
spinbox = [[tSpinbox alloc] init];
[box tAddControl:spinbox stretchy:NO];
*/
[mainwin tSetControl:box];
/*
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
button = [[tButton alloc] tInitWithText:@"Button"];
[hbox tAddControl:button stretchy:YES];
@ -53,7 +53,7 @@ BOOL firstvert = YES;
button = [[tButton alloc] tInitWithText:@"CCC"];
[hbox tAddControl:button stretchy:NO];
[box tAddControl:hbox stretchy:NO];
*/
// TODO this isn't stretchy in the proper order
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
spinbox = [[tSpinbox alloc] init];
@ -61,14 +61,14 @@ BOOL firstvert = YES;
spinbox = [[tSpinbox alloc] init];
[hbox tAddControl:spinbox stretchy:YES];
[box tAddControl:hbox stretchy:NO];
/*
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
entry = [[tEntry alloc] init];
[hbox tAddControl:entry stretchy:NO];
entry = [[tEntry alloc] init];
[hbox tAddControl:entry stretchy:YES];
[box tAddControl:hbox stretchy:NO];
*/
[mainwin tShow];
}

View File

@ -14,7 +14,7 @@
NSLog(@"%@%@ %d", s, [self className], (int) [self hasAmbiguousLayout]);
if ([self hasAmbiguousLayout])
[[self window] visualizeConstraints:[[self superview] constraints]];
else for (j = 0; j < [[self subviews] count]; j++)
for (j = 0; j < [[self subviews] count]; j++)
[[[self subviews] objectAtIndex:j] tIsAmbiguous:(indent + 1)];
}
@end
@ -55,7 +55,7 @@ else for (j = 0; j < [[self subviews] count]; j++)
{
[self->w cascadeTopLeftFromPoint:NSMakePoint(20, 20)];
[self->w makeKeyAndOrderFront:self];
[[self->w contentView] tIsAmbiguous:0];
// [[self->w contentView] tIsAmbiguous:0];
}
- (void)tRelayout