diff --git a/AppKit/CPBox.j b/AppKit/CPBox.j index c26877f07..9ab1d47d1 100644 --- a/AppKit/CPBox.j +++ b/AppKit/CPBox.j @@ -618,6 +618,13 @@ var CPBoxTypeKey = @"CPBoxTypeKey", if (_boxType != CPBoxSeparator) { + // FIXME: we have a problem with CIB decoding here. + // We should be able to simply add : _contentView = [self subviews][0] + // but first box subview seems to be malformed (badly decoded). + // For example, when deployed, this view doesn't have its _trackingAreas array initialized. + // As a (temporary) workaround, we encode/decode the _contentView property. We then transfer the subview hierarchy + // and replace the first (and only) box subview with this _contentView + _contentView = [aCoder decodeObjectForKey:CPBoxContentView] || [[CPView alloc] initWithFrame:[self bounds]]; var malformedContentView = [self subviews][0]; [_contentView setSubviews:[malformedContentView subviews]];