diff --git a/redo/osxaltest/box.m b/redo/osxaltest/box.m index b4564874..c74ec794 100644 --- a/redo/osxaltest/box.m +++ b/redo/osxaltest/box.m @@ -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? } diff --git a/redo/osxaltest/main.m b/redo/osxaltest/main.m index 0d899a90..84beda29 100644 --- a/redo/osxaltest/main.m +++ b/redo/osxaltest/main.m @@ -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]; } diff --git a/redo/osxaltest/window.m b/redo/osxaltest/window.m index 89c9b763..39d65635 100644 --- a/redo/osxaltest/window.m +++ b/redo/osxaltest/window.m @@ -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)]; }