More ambiguity debugging hooks.
This commit is contained in:
parent
c5a013aea1
commit
f7c5c6e60e
|
@ -120,6 +120,7 @@
|
|||
[constraint appendString:@"]"];
|
||||
}
|
||||
[constraint appendString:@"|"];
|
||||
NSLog(@"%@", constraint);
|
||||
[self->v addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:constraint options:0 metrics:nil views:views]];
|
||||
// TODO do not release constraint; it's autoreleased?
|
||||
|
||||
|
@ -131,6 +132,7 @@
|
|||
constraint = [NSMutableString stringWithString:@"V:|["];
|
||||
[constraint appendString:tAutoLayoutKey(i)];
|
||||
[constraint appendString:@"]|"];
|
||||
NSLog(@"%@", constraint);
|
||||
[self->v addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:constraint options:0 metrics:nil views:views]];
|
||||
// TODO do not release constraint; it's autoreleased?
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
for (i = 0; i < indent; i++)
|
||||
[s appendString:@" "];
|
||||
NSLog(@"%@%@ %d", s, [self className], (int) [self hasAmbiguousLayout]);
|
||||
if ([self hasAmbiguousLayout])
|
||||
[[self window] visualizeConstraints:[[self superview] constraints]];
|
||||
// if ([self hasAmbiguousLayout])
|
||||
// [[self window] visualizeConstraints:[self constraints]];
|
||||
for (j = 0; j < [[self subviews] count]; j++)
|
||||
[[[self subviews] objectAtIndex:j] tIsAmbiguous:(indent + 1)];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue