More debugging. It looks like I'll need to add that minimum width field after all.
This commit is contained in:
parent
f66e2e569e
commit
1e66408881
|
@ -123,7 +123,7 @@
|
||||||
[constraint appendString:@"]"];
|
[constraint appendString:@"]"];
|
||||||
}
|
}
|
||||||
[constraint appendString:@"|"];
|
[constraint appendString:@"|"];
|
||||||
NSLog(@"%@", constraint);
|
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?
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ NSLog(@"%@", constraint);
|
||||||
constraint = [NSMutableString stringWithString:@"V:|["];
|
constraint = [NSMutableString stringWithString:@"V:|["];
|
||||||
[constraint appendString:tAutoLayoutKey(i)];
|
[constraint appendString:tAutoLayoutKey(i)];
|
||||||
[constraint appendString:@"]|"];
|
[constraint appendString:@"]|"];
|
||||||
NSLog(@"%@", constraint);
|
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?
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
int nspinbox = 0;
|
||||||
|
|
||||||
@implementation tSpinbox {
|
@implementation tSpinbox {
|
||||||
tSpinboxContainer *c;
|
tSpinboxContainer *c;
|
||||||
NSTextField *t;
|
NSTextField *t;
|
||||||
|
@ -33,6 +35,8 @@
|
||||||
[self->c setTranslatesAutoresizingMaskIntoConstraints:NO];
|
[self->c setTranslatesAutoresizingMaskIntoConstraints:NO];
|
||||||
|
|
||||||
self->t = [[NSTextField alloc] initWithFrame:NSZeroRect];
|
self->t = [[NSTextField alloc] initWithFrame:NSZeroRect];
|
||||||
|
[self->t setStringValue:[NSString stringWithFormat:@"%d", nspinbox]];
|
||||||
|
nspinbox++;
|
||||||
[self->t setSelectable:YES];
|
[self->t setSelectable:YES];
|
||||||
[self->t setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
|
[self->t setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
|
||||||
[self->t setBordered:NO];
|
[self->t setBordered:NO];
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
for (i = 0; i < indent; i++)
|
for (i = 0; i < indent; i++)
|
||||||
[s appendString:@" "];
|
[s appendString:@" "];
|
||||||
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 constraints]];
|
[[self window] visualizeConstraints:[[self superview] constraints]];
|
||||||
for (j = 0; j < [[self subviews] count]; j++)
|
else for (j = 0; j < [[self subviews] count]; j++)
|
||||||
[[[self subviews] objectAtIndex:j] tIsAmbiguous:(indent + 1)];
|
[[[self subviews] objectAtIndex:j] tIsAmbiguous:(indent + 1)];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue