From 695f87e48551ca1b0ca3b8f280d522ece21393c1 Mon Sep 17 00:00:00 2001 From: qmathe Date: Fri, 13 Aug 2004 23:28:50 +0000 Subject: [PATCH] Correct details related to combo box git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19872 72102866-910b-0410-8b05-ffd578937521 --- Headers/AppKit/NSComboBoxCell.h | 5 +++++ Source/NSComboBox.m | 4 ++-- Source/NSComboBoxCell.m | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Headers/AppKit/NSComboBoxCell.h b/Headers/AppKit/NSComboBoxCell.h index c4be885ad..d4d6f498e 100644 --- a/Headers/AppKit/NSComboBoxCell.h +++ b/Headers/AppKit/NSComboBoxCell.h @@ -97,6 +97,11 @@ - (int)indexOfItemWithObjectValue:(id)object; - (NSArray *)objectValues; +- (BOOL) trackMouse: (NSEvent *)theEvent + inRect: (NSRect)cellFrame + ofView: (NSView *)controlView + untilMouseUp: (BOOL)flag; + #ifndef STRICT_OPENSTEP /* text completion */ - (NSString *)completedString:(NSString *)substring; diff --git a/Source/NSComboBox.m b/Source/NSComboBox.m index f4aa7c30d..b64782412 100644 --- a/Source/NSComboBox.m +++ b/Source/NSComboBox.m @@ -456,8 +456,8 @@ static NSNotificationCenter *nc; - (void) mouseDown: (NSEvent*)theEvent { BOOL buttonClicked; - // buttonClicked is set to the value YNO when the click occurs in the text cell - // and to the value YES when it occurs in the button cell + // buttonClicked is set to the value NO when the click occurs in the text cell + // and to the value YES when it occurs in the button cell. buttonClicked = [_cell trackMouse: theEvent inRect: [self bounds] ofView: self untilMouseUp: YES]; diff --git a/Source/NSComboBoxCell.m b/Source/NSComboBoxCell.m index b50205d4b..3ba9d4e89 100644 --- a/Source/NSComboBoxCell.m +++ b/Source/NSComboBoxCell.m @@ -1278,10 +1278,10 @@ numberOfRowsInColumn: (int)column * You rarely needs to call this method explicitly in your code. * By default, the implementation of this method first checks whether the combo * box cell uses a data source and whether the data source responds to - * comboBox:completedString: or comboBoxCell:completedString:. When it is the - * case, it uses this method to return str, else this method goes - * through the combo box cell items one by one and returns the first item found - * starting with substring. + * comboBox:completedString: or comboBoxCell:completedString:. + * When it is the case, it uses this method to return str, else this + * method goes through the combo box cell items one by one and returns the first + * item found starting with substring. * In the case, you want another behavior, you can override this method without * need to call the superclass method. */