Skip to content

Commit

Permalink
Added an assertion to protect against subviews being added to TUINSView
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Jul 18, 2012
1 parent f5ab5ef commit b363a4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/UIKit/TUINSView.m
Expand Up @@ -647,6 +647,11 @@ - (void)setUp {
[self recalculateNSViewClipping];
}

- (void)didAddSubview:(NSView *)view {
NSAssert(view == self.tuiHostView || view == self.appKitHostView, @"Subviews should not be added to TUINSView %@: %@", self, view);
[super didAddSubview:view];
}

#define ENABLE_NSTEXT_INPUT_CLIENT
#import "TUINSView+NSTextInputClient.m"
#undef ENABLE_NSTEXT_INPUT_CLIENT
Expand Down

0 comments on commit b363a4e

Please sign in to comment.