|
From: | Andreas Höschler |
Subject: | Re: List of GNUstep fixes |
Date: | Thu, 19 Jan 2006 22:21:53 +0100 |
*NSPopUpButtonCell*Here our implementations matches the specification, why should we
- (void)synchronizeTitleAndSelectedItem
{
int index;
if (!_pbcFlags.usesItemFromMenu) return;
if ([_menu numberOfItems] == 0)
{
index = -1;
}
else if (_pbcFlags.pullsDown)
{
index = 0;
}
else
{
index = [[_menu menuRepresentation] highlightedItemIndex];
if (index < 0) index = [self indexOfSelectedItem];
// if (index < 0) index = 0; // <--------------- this is bad
}
if ((index >= 0) && ([_menu numberOfItems] > index))
{
NSMenuItem *anItem;
// This conversion is needed as [setMenuItem:] expects an NSMenuItem
anItem = (NSMenuItem *)[_menu itemAtIndex: index];
[self setMenuItem: anItem];
}
else
{
[self setMenuItem: nil];
}
}
deviate from that?
[Prev in Thread] | Current Thread | [Next in Thread] |