Removed all the debugging hooks, re-enabled (and fixed) everything else.
This commit is contained in:
parent
70adbf6496
commit
1cdc7d3eb3
|
@ -132,7 +132,6 @@
|
||||||
[constraint appendString:@"]"];
|
[constraint appendString:@"]"];
|
||||||
}
|
}
|
||||||
[constraint appendString:@"|"];
|
[constraint appendString:@"|"];
|
||||||
NSLog(@"primary dimension %@", constraint);
|
|
||||||
[self->v addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:constraint options:0 metrics:nil views:views]];
|
[self->v addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:constraint options:0 metrics:nil views:views]];
|
||||||
// TODO do not release constraint; it's autoreleased?
|
// TODO do not release constraint; it's autoreleased?
|
||||||
|
|
||||||
|
@ -144,7 +143,6 @@ NSLog(@"primary dimension %@", constraint);
|
||||||
constraint = [NSMutableString stringWithString:@"V:|["];
|
constraint = [NSMutableString stringWithString:@"V:|["];
|
||||||
[constraint appendString:tAutoLayoutKey(i)];
|
[constraint appendString:tAutoLayoutKey(i)];
|
||||||
[constraint appendString:@"]|"];
|
[constraint appendString:@"]|"];
|
||||||
NSLog(@"other dimension %@", constraint);
|
|
||||||
[self->v addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:constraint options:0 metrics:nil views:views]];
|
[self->v addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:constraint options:0 metrics:nil views:views]];
|
||||||
// TODO do not release constraint; it's autoreleased?
|
// TODO do not release constraint; it's autoreleased?
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
p->attachTop = YES;
|
p->attachTop = YES;
|
||||||
p->attachRight = YES;
|
p->attachRight = YES;
|
||||||
p->attachBottom = YES;
|
p->attachBottom = YES;
|
||||||
|
p->nonStretchyWidthPredicate = @"(==96)"; // TODO verify against Interface Builder
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)tRelayout
|
- (void)tRelayout
|
||||||
|
|
|
@ -24,11 +24,11 @@ BOOL firstvert = YES;
|
||||||
|
|
||||||
box = [[tBox alloc] tInitVertical:firstvert spaced:spaced];
|
box = [[tBox alloc] tInitVertical:firstvert spaced:spaced];
|
||||||
|
|
||||||
/* spinbox = [[tSpinbox alloc] init];
|
spinbox = [[tSpinbox alloc] init];
|
||||||
[box tAddControl:spinbox stretchy:NO];
|
[box tAddControl:spinbox stretchy:NO];
|
||||||
*/
|
|
||||||
[mainwin tSetControl:box];
|
[mainwin tSetControl:box];
|
||||||
/*
|
|
||||||
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
|
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
|
||||||
button = [[tButton alloc] tInitWithText:@"Button"];
|
button = [[tButton alloc] tInitWithText:@"Button"];
|
||||||
[hbox tAddControl:button stretchy:YES];
|
[hbox tAddControl:button stretchy:YES];
|
||||||
|
@ -53,7 +53,7 @@ BOOL firstvert = YES;
|
||||||
button = [[tButton alloc] tInitWithText:@"CCC"];
|
button = [[tButton alloc] tInitWithText:@"CCC"];
|
||||||
[hbox tAddControl:button stretchy:NO];
|
[hbox tAddControl:button stretchy:NO];
|
||||||
[box tAddControl:hbox stretchy:NO];
|
[box tAddControl:hbox stretchy:NO];
|
||||||
*/
|
|
||||||
// TODO this isn't stretchy in the proper order
|
// TODO this isn't stretchy in the proper order
|
||||||
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
|
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
|
||||||
spinbox = [[tSpinbox alloc] init];
|
spinbox = [[tSpinbox alloc] init];
|
||||||
|
@ -61,14 +61,14 @@ BOOL firstvert = YES;
|
||||||
spinbox = [[tSpinbox alloc] init];
|
spinbox = [[tSpinbox alloc] init];
|
||||||
[hbox tAddControl:spinbox stretchy:YES];
|
[hbox tAddControl:spinbox stretchy:YES];
|
||||||
[box tAddControl:hbox stretchy:NO];
|
[box tAddControl:hbox stretchy:NO];
|
||||||
/*
|
|
||||||
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
|
hbox = [[tBox alloc] tInitVertical:!firstvert spaced:spaced];
|
||||||
entry = [[tEntry alloc] init];
|
entry = [[tEntry alloc] init];
|
||||||
[hbox tAddControl:entry stretchy:NO];
|
[hbox tAddControl:entry stretchy:NO];
|
||||||
entry = [[tEntry alloc] init];
|
entry = [[tEntry alloc] init];
|
||||||
[hbox tAddControl:entry stretchy:YES];
|
[hbox tAddControl:entry stretchy:YES];
|
||||||
[box tAddControl:hbox stretchy:NO];
|
[box tAddControl:hbox stretchy:NO];
|
||||||
*/
|
|
||||||
[mainwin tShow];
|
[mainwin tShow];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
NSLog(@"%@%@ %d", s, [self className], (int) [self hasAmbiguousLayout]);
|
NSLog(@"%@%@ %d", s, [self className], (int) [self hasAmbiguousLayout]);
|
||||||
if ([self hasAmbiguousLayout])
|
if ([self hasAmbiguousLayout])
|
||||||
[[self window] visualizeConstraints:[[self superview] constraints]];
|
[[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)];
|
[[[self subviews] objectAtIndex:j] tIsAmbiguous:(indent + 1)];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
@ -55,7 +55,7 @@ else for (j = 0; j < [[self subviews] count]; j++)
|
||||||
{
|
{
|
||||||
[self->w cascadeTopLeftFromPoint:NSMakePoint(20, 20)];
|
[self->w cascadeTopLeftFromPoint:NSMakePoint(20, 20)];
|
||||||
[self->w makeKeyAndOrderFront:self];
|
[self->w makeKeyAndOrderFront:self];
|
||||||
[[self->w contentView] tIsAmbiguous:0];
|
// [[self->w contentView] tIsAmbiguous:0];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)tRelayout
|
- (void)tRelayout
|
||||||
|
|
Loading…
Reference in New Issue