discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSMenuView patch (was: Re: Question about NSMenuView)


From: Matt Rice
Subject: Re: NSMenuView patch (was: Re: Question about NSMenuView)
Date: Fri, 16 Jan 2009 08:33:54 -0800

On Fri, Jan 16, 2009 at 7:51 AM, Wolfgang Lux <wolfgang.lux@gmail.com> wrote:
> I Wolfgang Lux wrote:
>
>> Matt Rice wrote:
>>
>>> could have swore i attached
>>
>> After a quick test, I'd say that GNUstep should adopt the patch
>> from foo2.diff as it gets the handling of pull down menus with
>> -usesItemFromMenu == YES right (i.e., the way it is done by Apple).
>
> Arrgggh, hit the Send button too early. While Matt's patch does
> indeed get the case for -usesItemFromMenu == YES right, it looks
> like we nevertheless need a different patch. Apparently, the first
> item of the menu of a NSPopUpButton cell configured as pull down
> menu never appears in the menu. Yet, I guess that any such patch
> will cause compatibility problems with existing .gorm files whose
> NSPopUpButtons may assume that the item at index zero is a real
> menu item.
>
> Wolfgang
>
>

yes, this is by design if the NSPopUpButton -usesItemFromMenu:
the title of the pop-up is stored in the NSMenu object
if usesItemFromMenu:NO the title of the pull-down is stored in the
NSButtons stringValue

gorm never specifically sets setUsesItemFromMenu: so it should pick it
up as YES from NSPopUpButtonCell -initTextCell:pullsDown:
the problem i'm seeing comes from not being able to edit the title of
pull downs because the editor can't select the title.

(I see that the encoder encodes the return value of -usesItemFromMenu:
not the actual flag, so no quick fix of adding a category to gorm
which always returns YES).

but yes if people are using pull-downs and expecting to be able to
select the title, that no longer works if it ever did it wasn't
supposed to IMHO... so yes, you guess right the problem appears to be
that usesItemFromMenu == YES is correct, but incompatible with
existing behavior.




reply via email to

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