Hello all,
this is a followup to my own post. The complete set of NSTabView
modifications to make GNUstep compatible with Cocoa follows:
- (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;
}
- (void) mouseDown: (NSEvent *)theEvent
{
NSPoint location = [theEvent locationInWindow];
location = [self convertPoint: location fromView: nil]; // <-- add
this line to gain compatibility with Cocoa
NSTabViewItem *anItem = [self tabViewItemAtPoint: location];
if (anItem != nil && ![anItem isEqual: _selected])
{
[self selectTabViewItem: anItem];
}
}
Regards,
Andreas
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep