From b3d8180541cb708fcca7c9f5ff7732ee5ecc3f68 Mon Sep 17 00:00:00 2001 From: Didier Korthoudt Date: Thu, 21 Jan 2016 00:10:38 +0100 Subject: [PATCH] FORMATTING: added comment to workaround --- AppKit/CPBox.j | 7 +++++++ 1 file changed, 7 insertions(+) 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]];