From cba26faf9bc5c0480968d4c6e3543402f04a4bbf Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sat, 27 Mar 2010 19:31:16 -0700 Subject: [PATCH] Fix for HelloWorld not flattening correctly. Reviewed by me. --- AppKit/CPClipView.j | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/AppKit/CPClipView.j b/AppKit/CPClipView.j index cae93bd44..f1dc67e10 100644 --- a/AppKit/CPClipView.j +++ b/AppKit/CPClipView.j @@ -120,9 +120,13 @@ [super setBoundsOrigin:aPoint]; - var superview = [self superview]; - - if([superview isKindOfClass:[CPScrollView class]]) + var superview = [self superview], + + // This is hack to avoid having to import CPScrollView. + // FIXME: Should CPScrollView be finding out about this on its own somehow? + scrollViewClass = objj_getClass("CPScrollView"); + + if([superview isKindOfClass:scrollViewClass]) [superview reflectScrolledClipView:self]; } @@ -173,9 +177,13 @@ return; // ... and we're in a scroll view of course. - var superview = [self superview]; - - if ([superview isKindOfClass:[CPScrollView class]]) + var superview = [self superview], + + // This is hack to avoid having to import CPScrollView. + // FIXME: Should CPScrollView be finding out about this on its own somehow? + scrollViewClass = objj_getClass("CPScrollView"); + + if ([superview isKindOfClass:scrollViewClass]) [superview reflectScrolledClipView:self]; }