discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Fix for NSTableView.m


From: Andreas Höschler
Subject: Re: Fix for NSTableView.m
Date: Sat, 7 Jan 2006 12:48:33 +0100

Hello Fred,

- (void) _postSelectionDidChangeNotification
{
   int index = [_selectedRows firstIndex];
   if (index != NSNotFound) [self scrollRowToVisible:[_selectedRows
firstIndex]];
   [nc postNotificationName:
    NSTableViewSelectionDidChangeNotification
      object: self];
}

could you please explain, why we need to scroll a selected row to be
visible and why this should be done in this specific method? The main
purpose of this method is to be overwritable in the subclass
NSOutlineView. I would expect that, if the table view has to scroll its
view when the selection changes the same is true for the outline view.

Also this method gets called on row and column selection and again for
deselection is this what you intend? To me it seems better to move the
scrolling into the methods that really need it.

Whatever place you find more appropriate. This was a quick hack to get MacOSX behaviour (it scrolls automatically). I was not aware that it is also called when the colum selection changes, also I don't think this would hurt. Please let me know if you find a better place for the call.

Regards,

  Andreas







reply via email to

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