discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTabView bug/incompatibility


From: Andreas Höschler
Subject: NSTabView bug/incompatibility
Date: Sat, 20 May 2006 11:37:16 +0200

Hello,

I have just figured out that the implementations of -tabViewItemAtPoint: in Cocoa and GNUstep make different assumptions about the coordinate system of the passed point.

- (NSTabViewItem*) tabViewItemAtPoint: (NSPoint)point
{
  int           howMany = [_items count];
  int           i;

point = [self convertPoint: point fromView: nil]; // <--- remove this line to gain compatibility with Cocoa

  for (i = 0; i < howMany; i++)
    {
      NSTabViewItem *anItem = [_items objectAtIndex: i];

      if (NSPointInRect(point,[anItem _tabRect]))
        return anItem;
    }

  return nil;
}

The Cocoa documentation is not very specific on this aspect. GNUstep expects the point inthe coordinate system of the window, Cocoa expects it in the coordiate system of the tab view. I think we should remove this line to make GNustep compatible with Cocoa.

Regards,

  Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]