Hi, I was wondering why there are extra underscores between subview
and superview Here are 2 patches to rename _sub_views to _subviews and
_super_view to _superview
I test a bit and loading old gorm and recreating one seem to work
fine. Hope this patch will reduce global warming a bit in a long run.

One thing, I simply remove NSView *_superview; in GSNibLoading.h in
doubt but since I don't see it decode or encode anywhere so it should
be okay?

On Thu, Apr 28, 2011 at 11:56 AM, Banlu Kemiyatorn <obj...@gmail.com> wrote:

> why it's _sub_views and not _subviews?


-- 
    .----.     Banlu Kemiyatorn
  /.../\...\   漫画家
 |.../  \...|  http://qstx.blogspot.com (Free Software Advocacy & Development)
 |../    \..|  http://feedbat.blogspot.com (Studio Work For Hire)
  \/      \/   http://groundzerostudiocomplex.blogspot.com (Studio Research)
Index: Source/NSBox.m
===================================================================
--- Source/NSBox.m	(revision 33007)
+++ Source/NSBox.m	(working copy)
@@ -316,8 +316,8 @@
   NSAssert(contentFrame.size.width >= 0 && contentFrame.size.height >= 0,
         @"illegal content frame supplied");
 
-  if (_super_view)
-    r = [_super_view convertRect:r fromView: self];
+  if (_superview)
+    r = [_superview convertRect:r fromView: self];
   
   // Add the difference to the frame
   f.size.width = f.size.width + (contentFrame.size.width - r.size.width);
@@ -414,9 +414,9 @@
         f.size.width = titleSize.width;
     }
   
-  if (_super_view != nil)
-    [self setFrameFromContentFrame: [self convertRect: f toView: _super_view]];
-  else // _super_view == nil
+  if (_superview != nil)
+    [self setFrameFromContentFrame: [self convertRect: f toView: _superview]];
+  else // _superview == nil
     [self setFrameFromContentFrame: f]; 
 }
 
@@ -570,7 +570,7 @@
                                      at: &_title_position];
 
         // The content view is our only sub_view
-        if ([_sub_views count] == 0)
+        if ([_subviews count] == 0)
           {
             NSDebugLLog(@"NSBox", @"NSBox: decoding without content view\n");
             // No content view
@@ -579,11 +579,11 @@
           }
         else 
           {
-            if ([_sub_views count] != 1)
+            if ([_subviews count] != 1)
               {
                 NSLog (@"Warning: Encoded NSBox with more than one content view!");
               }
-            _content_view = [_sub_views objectAtIndex: 0];
+            _content_view = [_subviews objectAtIndex: 0];
             // The following also computes _title_rect and _border_rect.
             [_content_view setFrame: [self calcSizesAllowingNegative: NO]];
           }
Index: Source/NSWindow.m
===================================================================
--- Source/NSWindow.m	(revision 33007)
+++ Source/NSWindow.m	(working copy)
@@ -2559,7 +2559,7 @@
 
       if (theView->_rFlags.has_subviews)
         {
-          NSArray *s = theView->_sub_views;
+          NSArray *s = theView->_subviews;
           unsigned count = [s count];
 
           if (count)
@@ -2622,7 +2622,7 @@
 
       if (theView->_rFlags.has_subviews)
         {
-          NSArray *s = theView->_sub_views;
+          NSArray *s = theView->_subviews;
           unsigned count = [s count];
 
           if (count)
@@ -3452,7 +3452,7 @@
    */
   if (theView->_rFlags.has_subviews)
     {
-      NSArray *sb = theView->_sub_views;
+      NSArray *sb = theView->_subviews;
       unsigned count = [sb count];
 
       if (count > 0)
@@ -3542,7 +3542,7 @@
    */
   if (theView->_rFlags.has_subviews)
     {
-      NSArray *sb = theView->_sub_views;
+      NSArray *sb = theView->_subviews;
       unsigned count = [sb count];
 
       if (count > 0)
Index: Source/NSClipView.m
===================================================================
--- Source/NSClipView.m	(revision 33007)
+++ Source/NSClipView.m	(working copy)
@@ -211,7 +211,7 @@
 
   /* TODO: Adjust the key view loop to include the new document view */
 
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 - (void) resetCursorRects
@@ -229,14 +229,14 @@
 {
   // FIXME: Shouldn't the document view be marked as needing a redraw?
   [super setBounds: b];
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 - (void) setBoundsSize: (NSSize)aSize
 {
   // FIXME: Shouldn't the document view be marked as needing a redraw?
   [super setBoundsSize: aSize];
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 - (void) setBoundsOrigin: (NSPoint)aPoint
@@ -378,7 +378,7 @@
 		   NSMinY (originalBounds) - aPoint.y);
     }*/
   
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 /**
@@ -538,7 +538,7 @@
 
 - (void) viewBoundsChanged: (NSNotification*)aNotification
 {
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 /**<p>Used when the document view frame notify its change.
@@ -557,40 +557,40 @@
       [self setNeedsDisplay: YES];
     }
 
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 - (void) scaleUnitSquareToSize: (NSSize)newUnitSize
 {
   [super scaleUnitSquareToSize: newUnitSize];
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 - (void) setFrameSize: (NSSize)aSize
 {
   [super setFrameSize: aSize];
   [self setBoundsOrigin: [self constrainScrollPoint: _bounds.origin]];
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 - (void) setFrameOrigin: (NSPoint)aPoint
 {
   [super setFrameOrigin: aPoint];
   [self setBoundsOrigin: [self constrainScrollPoint: _bounds.origin]];
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 - (void) setFrame: (NSRect)rect
 {
   [super setFrame: rect];
   [self setBoundsOrigin: [self constrainScrollPoint: _bounds.origin]];
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 - (void) translateOriginToPoint: (NSPoint)aPoint
 {
   [super translateOriginToPoint: aPoint];
-  [_super_view reflectScrolledClipView: self];
+  [_superview reflectScrolledClipView: self];
 }
 
 /**
Index: Source/GSNibLoading.m
===================================================================
--- Source/GSNibLoading.m	(revision 33007)
+++ Source/GSNibLoading.m	(working copy)
@@ -262,7 +262,7 @@
         {
           [v _setWindow: [self window]];
           RETAIN(v);
-          [_sub_views removeObject: v];
+          [_subviews removeObject: v];
           [self addSubview: v];
           RELEASE(v);
         }
Index: Source/NSToolbarItem.m
===================================================================
--- Source/NSToolbarItem.m	(revision 33007)
+++ Source/NSToolbarItem.m	(working copy)
@@ -578,7 +578,7 @@
 
 - (NSView *) hitTest: (NSPoint)point
 {
-  if (_super_view && [_super_view mouse: point inRect: _frame])
+  if (_superview && [_superview mouse: point inRect: _frame])
     {
       NSEvent *event = [NSApp currentEvent];
       NSToolbar *toolbar = [_toolbarItem toolbar];
Index: Source/NSTableView.m
===================================================================
--- Source/NSTableView.m	(revision 33007)
+++ Source/NSTableView.m	(working copy)
@@ -4198,10 +4198,10 @@
       else
         {
 	  noModPoint = [self convertPoint: noModPoint
-		  		   toView: _super_view];
+		  		   toView: _superview];
 	  noModPoint = 
-	     [(NSClipView *)_super_view constrainScrollPoint: noModPoint];
-	  [(NSClipView *)_super_view scrollToPoint: noModPoint];
+	     [(NSClipView *)_superview constrainScrollPoint: noModPoint];
+	  [(NSClipView *)_superview scrollToPoint: noModPoint];
 	}
     }
 }
@@ -4223,9 +4223,9 @@
       
   [self tile]; // resizes corner and header views, then displays
   
-  if (_super_view != nil)
+  if (_superview != nil)
     {
-      id ssv = [_super_view superview];
+      id ssv = [_superview superview];
       if ([ssv isKindOfClass: [NSScrollView class]])
         [ssv tile]; // draws any border type over corner and header views 
     } 
@@ -4240,9 +4240,9 @@
 {
   ASSIGN (_cornerView, aView);
   [self tile]; // resizes corner and header views, then displays
-  if (_super_view)
+  if (_superview)
     {
-      id ssv = [_super_view superview];
+      id ssv = [_superview superview];
       if ([ssv isKindOfClass: [NSScrollView class]])
         [ssv tile]; // draws any border type over corner and header views 
     }
@@ -4449,7 +4449,7 @@
 
 - (void) sizeLastColumnToFit
 {
-  if ((_super_view != nil) && (_numberOfColumns > 0))
+  if ((_superview != nil) && (_numberOfColumns > 0))
     {
       float excess_width;
       float last_column_width;
@@ -4458,8 +4458,8 @@
       lastColumn = [_tableColumns objectAtIndex: (_numberOfColumns - 1)];
       if ([lastColumn isResizable] == NO)
 	return;
-      excess_width = NSMaxX([self convertRect: [_super_view bounds] 
-				     fromView: _super_view]) - NSMaxX(_bounds);
+      excess_width = NSMaxX([self convertRect: [_superview bounds] 
+				     fromView: _superview]) - NSMaxX(_bounds);
       last_column_width = [lastColumn width] + excess_width;
       // This will automatically retile the table
       [lastColumn setWidth: last_column_width];
@@ -4470,10 +4470,10 @@
 {
   NSRect tmpRect = frameRect;
 
-  if ([_super_view respondsToSelector: @selector(documentVisibleRect)])
+  if ([_superview respondsToSelector: @selector(documentVisibleRect)])
     {
       float rowsHeight = ((_numberOfRows * _rowHeight) + 1);
-      NSRect docRect = [(NSClipView *)_super_view documentVisibleRect];
+      NSRect docRect = [(NSClipView *)_superview documentVisibleRect];
       
       if (rowsHeight < docRect.size.height)
 	{
@@ -4492,10 +4492,10 @@
 {
   NSSize tmpSize = frameSize;
   
-  if ([_super_view respondsToSelector: @selector(documentVisibleRect)])
+  if ([_superview respondsToSelector: @selector(documentVisibleRect)])
     {
       float rowsHeight = ((_numberOfRows * _rowHeight) + 1);
-      NSRect docRect = [(NSClipView *)_super_view documentVisibleRect];
+      NSRect docRect = [(NSClipView *)_superview documentVisibleRect];
       
       if (rowsHeight < docRect.size.height)
 	{
@@ -4532,7 +4532,7 @@
   float nextPoint;
   float toAddToCurrentColumns;
 
-  if ((_super_view == nil) || (_numberOfColumns == 0))
+  if ((_superview == nil) || (_numberOfColumns == 0))
     return;
 
   columnInfo = NSZoneMalloc(NSDefaultMallocZone(),
@@ -4547,8 +4547,8 @@
   isResizable = NSZoneMalloc(NSDefaultMallocZone(),
 			     sizeof(BOOL) * _numberOfColumns);
 
-  remainingWidth = NSMaxX([self convertRect: [_super_view bounds] 
-				fromView: _super_view]);
+  remainingWidth = NSMaxX([self convertRect: [_superview bounds] 
+				fromView: _superview]);
 
   /*
    *  We store the minWidth and the maxWidth of every column
@@ -4773,12 +4773,12 @@
   // Second Step
   // If superview (clipview) is bigger than that, divide remaining space 
   // between all columns
-  if ((_super_view != nil) && (_numberOfColumns > 0))
+  if ((_superview != nil) && (_numberOfColumns > 0))
     {
       float excess_width;
 
-      excess_width = NSMaxX ([self convertRect: [_super_view bounds] 
-				      fromView: _super_view]);
+      excess_width = NSMaxX ([self convertRect: [_superview bounds] 
+				      fromView: _superview]);
       excess_width -= table_width;
       // Since we resized each column at its minimum width, 
       // it's useless to try shrinking more: we can't
@@ -4886,16 +4886,16 @@
   newFrame.size.height = (_numberOfRows * _rowHeight) + 1;
   if (NO == NSEqualRects(newFrame, NSUnionRect(newFrame, _frame)))
     {
-      [_super_view setNeedsDisplayInRect: _frame];
+      [_superview setNeedsDisplayInRect: _frame];
     }
   [self setFrame: newFrame];
 
   /* If we are shorter in height than the enclosing clipview, we
      should redraw us now. */
-  if (_super_view != nil)
+  if (_superview != nil)
     {
       NSRect superviewBounds; // Get this *after* [self setFrame:]
-      superviewBounds = [_super_view bounds];
+      superviewBounds = [_superview bounds];
       if ((superviewBounds.origin.x <= _frame.origin.x) 
         && (NSMaxY(superviewBounds) >= NSMaxY(_frame)))
         {
@@ -4998,7 +4998,7 @@
 
 - (void) scrollRowToVisible: (int)rowIndex
 {
-  if (_super_view != nil)
+  if (_superview != nil)
     {
       NSRect rowRect = [self rectOfRow: rowIndex];
       NSRect visibleRect = [self visibleRect];
@@ -5012,8 +5012,8 @@
 	  
 	  newOrigin.x = visibleRect.origin.x;
 	  newOrigin.y = rowRect.origin.y;
-	  newOrigin = [self convertPoint: newOrigin  toView: _super_view];
-	  [(NSClipView *)_super_view scrollToPoint: newOrigin];
+	  newOrigin = [self convertPoint: newOrigin  toView: _superview];
+	  [(NSClipView *)_superview scrollToPoint: newOrigin];
 	  return;
 	}
       // If the row is under the bottom, or it is partially visible on
@@ -5026,8 +5026,8 @@
 	  newOrigin.x = visibleRect.origin.x;
 	  newOrigin.y = visibleRect.origin.y;
 	  newOrigin.y += NSMaxY (rowRect) - NSMaxY (visibleRect);
-	  newOrigin = [self convertPoint: newOrigin  toView: _super_view];
-	  [(NSClipView *)_super_view scrollToPoint: newOrigin];
+	  newOrigin = [self convertPoint: newOrigin  toView: _superview];
+	  [(NSClipView *)_superview scrollToPoint: newOrigin];
 	  return;
 	}
     }
@@ -5035,7 +5035,7 @@
 
 - (void) scrollColumnToVisible: (int)columnIndex
 {
-  if (_super_view != nil)
+  if (_superview != nil)
     {
       NSRect columnRect = [self rectOfColumn: columnIndex];
       NSRect visibleRect = [self visibleRect];
@@ -5050,8 +5050,8 @@
 	  
 	  newOrigin.x = columnRect.origin.x;
 	  newOrigin.y = visibleRect.origin.y;
-	  newOrigin = [self convertPoint: newOrigin  toView: _super_view];
-	  [(NSClipView *)_super_view scrollToPoint: newOrigin];
+	  newOrigin = [self convertPoint: newOrigin  toView: _superview];
+	  [(NSClipView *)_superview scrollToPoint: newOrigin];
 	  return;
 	}
       diff = NSMaxX (columnRect) - NSMaxX (visibleRect);
@@ -5065,8 +5065,8 @@
 	  newOrigin.x = visibleRect.origin.x;
 	  newOrigin.y = visibleRect.origin.y;
 	  newOrigin.x += diff;
-	  newOrigin = [self convertPoint: newOrigin  toView: _super_view];
-	  [(NSClipView *)_super_view scrollToPoint: newOrigin];
+	  newOrigin = [self convertPoint: newOrigin  toView: _superview];
+	  [(NSClipView *)_superview scrollToPoint: newOrigin];
 	  return;
 	}
     }
@@ -5694,7 +5694,7 @@
 	{
 	  NSRect columnRect = [self rectOfColumn: i];
 	  NSRect rowRect;
-	  NSRect visibleRect = [self convertRect: [_super_view bounds]
+	  NSRect visibleRect = [self convertRect: [_superview bounds]
 				     toView: self];
 	  NSPoint top = NSMakePoint(NSMinX(visibleRect),
 				    NSMinY(visibleRect));
@@ -6012,8 +6012,8 @@
 {
   if (_autoresizesAllColumnsToFit == YES)
     {
-      float visible_width = [self convertRect: [_super_view bounds] 
-				  fromView: _super_view].size.width;
+      float visible_width = [self convertRect: [_superview bounds] 
+				  fromView: _superview].size.width;
       float table_width = 0;
 
       if (_numberOfColumns > 0)
@@ -6026,9 +6026,9 @@
       /*
 	NSLog(@"columnOrigins[0] %f", _columnOrigins[0]);
 	NSLog(@"superview.bounds %@", 
-	      NSStringFromRect([_super_view bounds]));
+	      NSStringFromRect([_superview bounds]));
 	NSLog(@"superview.frame %@", 
-	      NSStringFromRect([_super_view frame]));
+	      NSStringFromRect([_superview frame]));
 	NSLog(@"table_width %f", table_width);
 	NSLog(@"width %f", visible_width);
 	NSLog(@"_superview_width %f", _superview_width);
@@ -6058,8 +6058,8 @@
     }
   else
     {
-      float visible_width = [self convertRect: [_super_view bounds] 
-				  fromView: _super_view].size.width;
+      float visible_width = [self convertRect: [_superview bounds] 
+				  fromView: _superview].size.width;
       float table_width = 0;
 
       if (_numberOfColumns > 0)
@@ -6072,9 +6072,9 @@
       /*
 	NSLog(@"columnOrigins[0] %f", _columnOrigins[0]);
 	NSLog(@"superview.bounds %@", 
-	      NSStringFromRect([_super_view bounds]));
+	      NSStringFromRect([_superview bounds]));
 	NSLog(@"superview.frame %@", 
-	      NSStringFromRect([_super_view frame]));
+	      NSStringFromRect([_superview frame]));
 	NSLog(@"table_width %f", table_width);
 	NSLog(@"width %f", visible_width);
 	NSLog(@"_superview_width %f", _superview_width);
Index: Source/NSTextField.m
===================================================================
--- Source/NSTextField.m	(revision 33007)
+++ Source/NSTextField.m	(working copy)
@@ -162,7 +162,7 @@
  */
 - (void) selectText: (id)sender
 {
-  if ([self isSelectable] && (_super_view != nil))
+  if ([self isSelectable] && (_superview != nil))
     {
       if (_text_object)
         [_text_object selectAll: self];
Index: Source/NSView.m
===================================================================
--- Source/NSView.m	(revision 33007)
+++ Source/NSView.m	(working copy)
@@ -226,13 +226,13 @@
         }
       if (_rFlags.has_subviews)
         {
-          count = [_sub_views count];
+          count = [_subviews count];
           if (count > 0)
             {
               NSView*	array[count];
               unsigned	i;
               
-              [_sub_views getObjects: array];
+              [_subviews getObjects: array];
               for (i = 0; i < count; i++)
                 {
                   NSView	*sub = array[i];
@@ -303,10 +303,10 @@
           NSAffineTransform	*pMatrix;
           NSAffineTransformStruct     ts;
  
-	  if (_super_view != nil)
+	  if (_superview != nil)
 	    {
-	      wasFlipped = [_super_view isFlipped];
-	      pMatrix = [_super_view _matrixToWindow];
+	      wasFlipped = [_superview isFlipped];
+	      pMatrix = [_superview _matrixToWindow];
 	    }
 	  else
 	    {
@@ -347,10 +347,10 @@
           [_matrixFromWindow setTransformStruct: ts];
           [_matrixFromWindow invert];
 
-	  if (_super_view != nil)
+	  if (_superview != nil)
 	    {
-	      superviewsVisibleRect = [self convertRect: [_super_view visibleRect]
-					       fromView: _super_view];
+	      superviewsVisibleRect = [self convertRect: [_superview visibleRect]
+					       fromView: _superview];
 	      
 	      _visibleRect = NSIntersectionRect(superviewsVisibleRect, _bounds);
 	    }
@@ -373,14 +373,14 @@
   [self viewDidMoveToWindow];
   if (_rFlags.has_subviews)
     {
-      unsigned	count = [_sub_views count];
+      unsigned	count = [_subviews count];
 
       if (count > 0)
         {
           unsigned	i;
           NSView	*array[count];
 
-          [_sub_views getObjects: array];
+          [_subviews getObjects: array];
           for (i = 0; i < count; ++i)
             {
               [array[i] _viewDidMoveToWindow];
@@ -432,14 +432,14 @@
 
   if (_rFlags.has_subviews)
     {
-      unsigned	count = [_sub_views count];
+      unsigned	count = [_subviews count];
 
       if (count > 0)
         {
           unsigned	i;
           NSView	*array[count];
           
-          [_sub_views getObjects: array];
+          [_subviews getObjects: array];
           for (i = 0; i < count; ++i)
             {
               [array[i] _viewWillMoveToWindow: newWindow];
@@ -451,7 +451,7 @@
 - (void) _viewWillMoveToSuperview: (NSView*)newSuper
 {
   [self viewWillMoveToSuperview: newSuper];
-  _super_view = newSuper;
+  _superview = newSuper;
 }
 
 /*
@@ -486,7 +486,7 @@
   [desc appendFormat: @"%@%@\n", prefix, [self description], nil];
 
   prefix = [prefix stringByAppendingString: @"  "];
-  e = [_sub_views objectEnumerator];
+  e = [_subviews objectEnumerator];
   while ((v = (NSView*)[e nextObject]) != nil)
     {
       [desc appendString: [v _subtreeDescriptionWithPrefix: prefix]];
@@ -609,12 +609,12 @@
   _matrixToWindow = [NSAffineTransform new];   // Map to window coordinates
   _matrixFromWindow = [NSAffineTransform new]; // Map from window coordinates
 
-  _sub_views = [NSMutableArray new];
+  _subviews = [NSMutableArray new];
   _tracking_rects = [NSMutableArray new];
   _cursor_rects = [NSMutableArray new];
 
   // Some values are already set by initialisation
-  //_super_view = nil;
+  //_superview = nil;
   //_window = nil;
   //_is_rotated_from_base = NO;
   //_is_rotated_or_scaled_from_base = NO;
@@ -736,16 +736,16 @@
    * Now remove our subviews, AFTER cleaning up the view chain, in case
    * any of our subviews were in the chain.
    */
-  while ([_sub_views count] > 0)
+  while ([_subviews count] > 0)
     {
-      [[_sub_views lastObject] removeFromSuperviewWithoutNeedingDisplay];
+      [[_subviews lastObject] removeFromSuperviewWithoutNeedingDisplay];
     }
 
   RELEASE(_matrixToWindow);
   RELEASE(_matrixFromWindow);
   TEST_RELEASE(_frameMatrix);
   TEST_RELEASE(_boundsMatrix);
-  TEST_RELEASE(_sub_views);
+  TEST_RELEASE(_subviews);
   if (_rFlags.has_tooltips != 0)
     {
       [GSToolTips removeTipsForView: self];
@@ -808,14 +808,14 @@
     }
   else
     {
-      index = [_sub_views indexOfObjectIdenticalTo: otherView];
+      index = [_subviews indexOfObjectIdenticalTo: otherView];
     }
   if (index == NSNotFound)
     {
       if (place == NSWindowBelow)
         index = 0;
       else
-        index = [_sub_views count];
+        index = [_subviews count];
     }
   else if (place != NSWindowBelow)
     {
@@ -825,7 +825,7 @@
   [aView _viewWillMoveToWindow: _window];
   [aView _viewWillMoveToSuperview: self];
   [aView setNextResponder: self];
-  [_sub_views insertObject: aView atIndex: index];
+  [_subviews insertObject: aView atIndex: index];
   _rFlags.has_subviews = 1;
   [aView resetCursorRects];
   [aView setNeedsDisplay: YES];
@@ -855,14 +855,14 @@
    * If neither are descendants of each other and either does not have a
    * superview then they cannot have a common ancestor
    */
-  if (!_super_view)
+  if (!_superview)
     return nil;
 
   if (![aView superview])
     return nil;
 
   /* Find the common ancestor of superviews */
-  return [_super_view ancestorSharedWithView: [aView superview]];
+  return [_superview ancestorSharedWithView: [aView superview]];
 }
 
 /**
@@ -873,18 +873,18 @@
   if (aView == self)
     return YES;
 
-  if (!_super_view)
+  if (!_superview)
     return NO;
 
-  if (_super_view == aView)
+  if (_superview == aView)
     return YES;
 
-  return [_super_view isDescendantOf: aView];
+  return [_superview isDescendantOf: aView];
 }
 
 - (NSView*) opaqueAncestor
 {
-  NSView	*next = _super_view;
+  NSView	*next = _superview;
   NSView	*current = self;
 
   while (next != nil)
@@ -894,7 +894,7 @@
 	  break;
 	}
       current = next;
-      next = current->_super_view;
+      next = current->_superview;
     }
   return current;
 }
@@ -905,9 +905,9 @@
  */
 - (void) removeFromSuperviewWithoutNeedingDisplay
 {
-  if (_super_view != nil)
+  if (_superview != nil)
     {
-      [_super_view removeSubview: self];
+      [_superview removeSubview: self];
     }
 }
 
@@ -922,10 +922,10 @@
   -removeFromSuperviewWithoutNeedingDisplay method instead.</p> */
 - (void) removeFromSuperview
 {
-  if (_super_view != nil)
+  if (_superview != nil)
     {
-      [_super_view setNeedsDisplayInRect: _frame];
-      [_super_view removeSubview: self];
+      [_superview setNeedsDisplayInRect: _frame];
+      [_superview removeSubview: self];
     }
 }
 
@@ -956,17 +956,17 @@
 	}
     }
   [self willRemoveSubview: aView];
-  aView->_super_view = nil;
+  aView->_superview = nil;
   [aView _viewWillMoveToWindow: nil];
   [aView _viewWillMoveToSuperview: nil];
   [aView setNextResponder: nil];
   RETAIN(aView);
-  [_sub_views removeObjectIdenticalTo: aView];
+  [_subviews removeObjectIdenticalTo: aView];
   [aView setNeedsDisplay: NO];
   [aView _viewDidMoveToWindow];
   [aView viewDidMoveToSuperview];
   RELEASE(aView);
-  if ([_sub_views count] == 0)
+  if ([_subviews count] == 0)
     {
       _rFlags.has_subviews = 0;
     }
@@ -1004,7 +1004,7 @@
       [newView _viewWillMoveToWindow: _window];
       [newView _viewWillMoveToSuperview: self];
       [newView setNextResponder: self];
-      [_sub_views addObject: newView];
+      [_subviews addObject: newView];
       _rFlags.has_subviews = 1;
       [newView resetCursorRects];
       [newView setNeedsDisplay: YES];
@@ -1013,7 +1013,7 @@
       [self didAddSubview: newView];
       RELEASE(newView);
     }
-  else if ([_sub_views indexOfObjectIdenticalTo: oldView] != NSNotFound)
+  else if ([_subviews indexOfObjectIdenticalTo: oldView] != NSNotFound)
     {
       if (newView == nil)
 	{
@@ -1040,12 +1040,12 @@
 	    {
 	      (*invalidateImp)(newView, invalidateSel);
 	    }
-	  index = [_sub_views indexOfObjectIdenticalTo: oldView];
+	  index = [_subviews indexOfObjectIdenticalTo: oldView];
 	  [oldView removeFromSuperview];
 	  [newView _viewWillMoveToWindow: _window];
 	  [newView _viewWillMoveToSuperview: self];
 	  [newView setNextResponder: self];
-          [_sub_views insertObject: newView
+          [_subviews insertObject: newView
                            atIndex: index];
 	  _rFlags.has_subviews = 1;
 	  [newView resetCursorRects];
@@ -1061,7 +1061,7 @@
 - (void) sortSubviewsUsingFunction: (int (*)(id ,id ,void*))compare
 			   context: (void*)context
 {
-  [_sub_views sortUsingFunction: compare context: context];
+  [_subviews sortUsingFunction: compare context: context];
 }
 
 /**
@@ -1324,9 +1324,9 @@
     {
       return YES;
     }
-  else if (_super_view)
+  else if (_superview)
     {
-      return [_super_view isRotatedFromBase];
+      return [_superview isRotatedFromBase];
     }
   else
     {
@@ -1340,9 +1340,9 @@
     {
       return YES;
     }
-  else if (_super_view)
+  else if (_superview)
     {
-      return [_super_view isRotatedOrScaledFromBase];
+      return [_superview isRotatedOrScaledFromBase];
     }
   else
     {
@@ -1884,7 +1884,7 @@
       if (_autoresizes_subviews == NO || _is_rotated_from_base == YES)
           return;
 
-      e = [_sub_views objectEnumerator];
+      e = [_subviews objectEnumerator];
       o = [e nextObject];
       while (o)
         {
@@ -1904,8 +1904,8 @@
     return;
 
   superViewFrameSize = NSMakeSize(0,0);
-  if (_super_view)
-    superViewFrameSize = [_super_view frame].size;
+  if (_superview)
+    superViewFrameSize = [_superview frame].size;
 
   /*
    * determine if and how the X axis can be resized
@@ -1964,7 +1964,7 @@
 	}
       if (_autoresizingMask & (NSViewMaxYMargin | NSViewMinYMargin))
 	{
-	  if (_super_view && [_super_view isFlipped])
+	  if (_superview && [_superview isFlipped])
 	    {
 	      if (_autoresizingMask & NSViewMaxYMargin)
 		{
@@ -2377,7 +2377,7 @@
        */ 
       if (_rFlags.needs_display == YES)
         {
-          NSEnumerator *enumerator = [_sub_views objectEnumerator];
+          NSEnumerator *enumerator = [_subviews objectEnumerator];
           NSView *subview;
           BOOL subviewNeedsDisplay = NO;
          
@@ -2499,14 +2499,14 @@
    */
   if (_rFlags.has_subviews == YES)
     {
-      unsigned count = [_sub_views count];
+      unsigned count = [_subviews count];
 
       if (count > 0)
         {
           NSView *array[count];
           unsigned i;
           
-          [_sub_views getObjects: array];
+          [_subviews getObjects: array];
 
           for (i = 0; i < count; ++i)
             {
@@ -2708,7 +2708,7 @@
 - (void) _setNeedsDisplayInRect_real: (NSValue *)v
 {
   NSRect invalidRect = [v rectValue];
-  NSView *currentView = _super_view;
+  NSView *currentView = _superview;
 
   /*
    *	Limit to bounds, combine with old _invalidRect, and then check to see
@@ -2742,7 +2742,7 @@
   while (currentView)
     {
       currentView->_rFlags.needs_display = YES;
-      currentView = currentView->_super_view;
+      currentView = currentView->_superview;
     }
   // Also mark the window, as this may not happen above
   [_window setViewsNeedDisplay: YES];
@@ -2861,7 +2861,7 @@
           //
           // So, recalculate the subview coordinates now to make them correct.
 
-          [_sub_views makeObjectsPerformSelector: 
+          [_subviews makeObjectsPerformSelector: 
             @selector(_invalidateCoordinates)];
         }
       [self setNeedsDisplay: YES];
@@ -2875,7 +2875,7 @@
 
 - (BOOL) isHiddenOrHasHiddenAncestor
 {
-  return ([self isHidden] || [_super_view isHiddenOrHasHiddenAncestor]);
+  return ([self isHidden] || [_superview isHiddenOrHasHiddenAncestor]);
 }
 
 /*
@@ -2938,8 +2938,8 @@
  */
 - (BOOL) autoscroll: (NSEvent*)theEvent
 {
-  if (_super_view)
-    return [_super_view autoscroll: theEvent];
+  if (_superview)
+    return [_superview autoscroll: theEvent];
 
   return NO;
 }
@@ -3225,14 +3225,14 @@
     }
   else if (_rFlags.has_subviews)
     {
-      unsigned	count = [_sub_views count];
+      unsigned	count = [_subviews count];
 
       if (count > 0)
 	{
 	  NSView	*array[count];
 	  unsigned	i;
 
-	  [_sub_views getObjects: array];
+	  [_subviews getObjects: array];
 
 	  /*
 	   * Quick check to see if any of our direct descendents has the tag.
@@ -3302,7 +3302,7 @@
 
   /* If not within our frame then it can't be a hit.
 
-  As a special case, always assume that it's a hit if our _super_view is nil,
+  As a special case, always assume that it's a hit if our _superview is nil,
   ie. if we're the top-level view in a window.
   */
 
@@ -3313,29 +3313,29 @@
 
   if (_is_rotated_or_scaled_from_base)
     {
-      p = [self convertPoint: aPoint fromView: _super_view];
+      p = [self convertPoint: aPoint fromView: _superview];
       if (!NSPointInRect (p, _bounds))
         {
           return nil;
         }
     }
-  else if (_super_view && ![_super_view mouse: aPoint inRect: _frame])
+  else if (_superview && ![_superview mouse: aPoint inRect: _frame])
     {
       return nil;
     }
   else
     {
-      p = [self convertPoint: aPoint fromView: _super_view];
+      p = [self convertPoint: aPoint fromView: _superview];
     }
 
   if (_rFlags.has_subviews)
     {
-      count = [_sub_views count];
+      count = [_subviews count];
       if (count > 0)
         {
           NSView	*array[count];
 
-          [_sub_views getObjects: array];
+          [_subviews getObjects: array];
           
           while (count > 0)
             {
@@ -3367,8 +3367,8 @@
 {
   unsigned i;
 
-  for (i = 0; i < [_sub_views count]; i++)
-    if ([[_sub_views objectAtIndex: i] performKeyEquivalent: theEvent] == YES)
+  for (i = 0; i < [_subviews count]; i++)
+    if ([[_subviews objectAtIndex: i] performKeyEquivalent: theEvent] == YES)
       return YES;
   return NO;
 }
@@ -3377,8 +3377,8 @@
 {
   unsigned i;
 
-  for (i = 0; i < [_sub_views count]; i++)
-    if ([[_sub_views objectAtIndex: i] performMnemonic: aString] == YES)
+  for (i = 0; i < [_subviews count]; i++)
+    if ([[_subviews objectAtIndex: i] performMnemonic: aString] == YES)
       return YES;
   return NO;
 }
@@ -3959,7 +3959,7 @@
     {
       id e, o;
 
-      e = [_sub_views objectEnumerator];
+      e = [_subviews objectEnumerator];
       while ((o = [e nextObject]) != nil)
 	{
           // FIXME: We have to convert this values for the subclass
@@ -4011,7 +4011,7 @@
     {
       id e, o;
 
-      e = [_sub_views objectEnumerator];
+      e = [_subviews objectEnumerator];
       while ((o = [e nextObject]) != nil)
 	{
           // FIXME: We have to convert this values for the subclass
@@ -4451,7 +4451,7 @@
 	      forKey: @"NSNextKeyView"];
       [aCoder encodeConditionalObject: [self previousKeyView] 
 	      forKey: @"NSPreviousKeyView"];
-      [aCoder encodeObject: _sub_views 
+      [aCoder encodeObject: _subviews 
 	      forKey: @"NSSubviews"];
       [aCoder encodeRect: _frame 
 	      forKey: @"NSFrame"];
@@ -4478,9 +4478,9 @@
       // Don't attempt to archive the superview of a view which is the
       // content view for a window.
       //
-      if (([[self window] contentView] != self) && _super_view != nil)
+      if (([[self window] contentView] != self) && _superview != nil)
         {
-          [aCoder encodeObject: _super_view forKey: @"NSSuperview"];
+          [aCoder encodeObject: _superview forKey: @"NSSuperview"];
         }
     }
   else
@@ -4498,7 +4498,7 @@
       [aCoder encodeValueOfObjCType: @encode(unsigned int) at: &_autoresizingMask];
       [aCoder encodeConditionalObject: [self nextKeyView]];
       [aCoder encodeConditionalObject: [self previousKeyView]];
-      [aCoder encodeObject: _sub_views];
+      [aCoder encodeObject: _subviews];
       NSDebugLLog(@"NSView", @"NSView: finish encoding\n");
     }
 }
@@ -4546,7 +4546,7 @@
           [self setBounds: [aDecoder decodeRectForKey: @"NSBounds"]];
         }
       
-      _sub_views = [NSMutableArray new];
+      _subviews = [NSMutableArray new];
       _tracking_rects = [NSMutableArray new];
       _cursor_rects = [NSMutableArray new];
       
@@ -4602,7 +4602,7 @@
 	  [sub _viewWillMoveToWindow: _window];
 	  [sub _viewWillMoveToSuperview: self];
 	  [sub setNextResponder: self];
-	  [_sub_views addObject: sub];
+	  [_subviews addObject: sub];
 	  _rFlags.has_subviews = 1;
 	  [sub resetCursorRects];
 	  [sub setNeedsDisplay: YES];
@@ -4628,11 +4628,11 @@
       rect = [aDecoder decodeRect];
       [self setBounds: rect];
       
-      _sub_views = [NSMutableArray new];
+      _subviews = [NSMutableArray new];
       _tracking_rects = [NSMutableArray new];
       _cursor_rects = [NSMutableArray new];
       
-      _super_view = nil;
+      _superview = nil;
       _window = nil;
       _rFlags.needs_display = YES;
       [aDecoder decodeValueOfObjCType: @encode(BOOL)
@@ -4663,7 +4663,7 @@
 	  [sub _viewWillMoveToWindow: _window];
 	  [sub _viewWillMoveToSuperview: self];
 	  [sub setNextResponder: self];
-	  [_sub_views addObject: sub];
+	  [_subviews addObject: sub];
 	  _rFlags.has_subviews = 1;
 	  [sub resetCursorRects];
 	  [sub setNeedsDisplay: YES];
@@ -4713,12 +4713,12 @@
    * a mutable array does a shallow copy - which is what we want to give
    * away - we don't want people to mess with our actual subviews array.
    */
-  return AUTORELEASE([_sub_views mutableCopyWithZone: NSDefaultMallocZone()]);
+  return AUTORELEASE([_subviews mutableCopyWithZone: NSDefaultMallocZone()]);
 }
 
 - (NSView*) superview
 {
-  return _super_view;
+  return _superview;
 }
 
 - (BOOL) shouldDrawColor
Index: Headers/AppKit/NSView.h
===================================================================
--- Headers/AppKit/NSView.h	(revision 33007)
+++ Headers/AppKit/NSView.h	(working copy)
@@ -104,9 +104,9 @@
   id _matrixToWindow;
   id _matrixFromWindow;
 
-  NSView* _super_view;
+  NSView* _superview;
 PACKAGE_SCOPE
-  NSMutableArray *_sub_views;
+  NSMutableArray *_subviews;
 @protected
   NSWindow *_window;
 PACKAGE_SCOPE
Index: Headers/Additions/GNUstepGUI/GSNibLoading.h
===================================================================
--- Headers/Additions/GNUstepGUI/GSNibLoading.h	(revision 33007)
+++ Headers/Additions/GNUstepGUI/GSNibLoading.h	(working copy)
@@ -219,7 +219,6 @@
 {
   NSString *_className;
   NSString *_extension;
-  NSView *_superview;
   NSView *_view;
 }
 - (void) setClassName: (NSString *)name;
Index: Model/GMAppKit.m
===================================================================
--- Model/GMAppKit.m	(revision 33007)
+++ Model/GMAppKit.m	(working copy)
@@ -1222,7 +1222,7 @@
 
 #ifdef GNU_GUI_LIBRARY
   _rFlags.flipped_view = [self isFlipped];
-  if ([_sub_views count])
+  if ([_subviews count])
     _rFlags.has_subviews = 1;
 #endif
 
Index: Palettes/3Containers/GormTableViewEditor.m
===================================================================
--- Palettes/3Containers/GormTableViewEditor.m	(revision 33000)
+++ Palettes/3Containers/GormTableViewEditor.m	(working copy)
@@ -88,18 +88,18 @@
 
 - (void) scrollToPoint: (NSPoint)point
 {
-  if ([_super_view respondsToSelector:@selector(scrollToPoint:)])
+  if ([_superview respondsToSelector:@selector(scrollToPoint:)])
     {
-      [(NSClipView *)_super_view scrollToPoint: point]; 
+      [(NSClipView *)_superview scrollToPoint: point]; 
     }
 }
 
 - (NSRect) documentVisibleRect
 {
   NSRect visRect = _bounds;
-  if ([_super_view respondsToSelector:@selector(documentVisibleRect)])
+  if ([_superview respondsToSelector:@selector(documentVisibleRect)])
     {
-      visRect = [(NSClipView *)_super_view documentVisibleRect]; 
+      visRect = [(NSClipView *)_superview documentVisibleRect]; 
     }
   return visRect; 
 }
Index: GormCore/NSView+GormExtensions.m
===================================================================
--- GormCore/NSView+GormExtensions.m	(revision 33000)
+++ GormCore/NSView+GormExtensions.m	(working copy)
@@ -72,11 +72,11 @@
 - (void) moveViewToFront: (NSView *)sv
 {
   NSDebugLog(@"move to front %@", sv);
-  if([_sub_views containsObject: sv])
+  if([_subviews containsObject: sv])
     {
       RETAIN(sv); // make sure it doesn't deallocate the view.
-      [_sub_views removeObject: sv];
-      [_sub_views addObject: sv]; // add it to the end.
+      [_subviews removeObject: sv];
+      [_subviews addObject: sv]; // add it to the end.
       RELEASE(sv);
     }
 }
@@ -88,18 +88,18 @@
 - (void) moveViewToBack: (NSView *)sv
 {
   NSDebugLog(@"move to back %@", sv);
-  if([_sub_views containsObject: sv])
+  if([_subviews containsObject: sv])
     {
       RETAIN(sv); // make sure it doesn't deallocate the view.
-      [_sub_views removeObject: sv];
-      if([_sub_views count] > 0)
+      [_subviews removeObject: sv];
+      if([_subviews count] > 0)
 	{
-	  [_sub_views insertObject: sv 
+	  [_subviews insertObject: sv 
 		      atIndex: 0]; // add it to the end.
 	}
       else
 	{
-	  [_sub_views addObject: sv];
+	  [_subviews addObject: sv];
 	}
       RELEASE(sv);
     }
Index: GormCore/GormCustomView.m
===================================================================
--- GormCore/GormCustomView.m	(revision 33000)
+++ GormCore/GormCustomView.m	(working copy)
@@ -193,7 +193,7 @@
 
       // get the classname...
       [self setClassName: [customView className]];
-      // _super_view = [customView superview];
+      // _superview = [customView superview];
       // _window = [customView window];
 
       RELEASE(customView);
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to