Trouble with NSPopUpButton and hierarchical menus?
-
I've been trying to create an NSPopUpButton in IB3, in pull-down mode,
that has a submenu. It doesn't seem to work properly though. After I
drag in the "Menu >" item into the pop-up button's menu, the pop-up
seems to be irrevocably broken-it randomly neglects to display some
items, or fails to show a menu at all when clicked. Even after removing
the submenu, oftentimes the button is left in a weird state and needs to
be completely deleted and rebuilt in order to function normally again.
Is this a known issue? I vaguely remember that pop-up buttons
"shouldn't" have submenus, but I'm not sure that was supposed to apply
to pull-down buttons, and IB3 certainly isn't enforcing any limitation
here. All the same, the behavior is clearly broken.
I can file a radar if needed. -
On Apr 30, 2008, at 3:58 PM, John Stiles wrote:> I've been trying to create an NSPopUpButton in IB3, in pull-down mode,
> that has a submenu. It doesn't seem to work properly though. After I
> drag in the "Menu >" item into the pop-up button's menu, the pop-up
> seems to be irrevocably broken-it randomly neglects to display some
> items, or fails to show a menu at all when clicked. Even after
> removing
> the submenu, oftentimes the button is left in a weird state and
> needs to
> be completely deleted and rebuilt in order to function normally again.
>
>
>
> Is this a known issue? I vaguely remember that pop-up buttons
> "shouldn't" have submenus, but I'm not sure that was supposed to apply
> to pull-down buttons, and IB3 certainly isn't enforcing any limitation
> here. All the same, the behavior is clearly broken.
>
>
>
> I can file a radar if needed.
Hi John,
I'm not familiar with the problems you mention; please file a bug.
Thanks,
-Peter -
I can confirm this bug, it's the same (or similar to) one I mentioned
a few months ago but had some trouble reproducing at the time. I
thought it was related to importing older IB files, but I can make it
happen with any.
Create a pop-up button. Set it to "pull down" mode. The first menu
item is hidden, as it should be. Drag a new menu item to the menu. It
will cause all items except the one dragged in to be set to "hidden".
If you don't notice this then the items obviously don't show up at
runtime. You can select all and set them to visible, then go back and
set the first item back to hidden as a workaround.
G.
On 1 May 2008, at 10:37 am, Peter Ammon wrote:>
> On Apr 30, 2008, at 3:58 PM, John Stiles wrote:
>
>> I've been trying to create an NSPopUpButton in IB3, in pull-down
>> mode,
>> that has a submenu. It doesn't seem to work properly though. After I
>> drag in the "Menu >" item into the pop-up button's menu, the pop-up
>> seems to be irrevocably broken-it randomly neglects to display some
>> items, or fails to show a menu at all when clicked. Even after
>> removing
>> the submenu, oftentimes the button is left in a weird state and
>> needs to
>> be completely deleted and rebuilt in order to function normally
>> again.
>>
>>
>>
>> Is this a known issue? I vaguely remember that pop-up buttons
>> "shouldn't" have submenus, but I'm not sure that was supposed to
>> apply
>> to pull-down buttons, and IB3 certainly isn't enforcing any
>> limitation
>> here. All the same, the behavior is clearly broken.
>>
>>
>>
>> I can file a radar if needed.
>
> Hi John,
>
> I'm not familiar with the problems you mention; please file a bug.
>
> Thanks,
> -Peter -
Oh, is that the problem? I didn't see a Hidden checkbox. I'll look again.
Guess it's Radar time.
Graham Cox wrote:> I can confirm this bug, it's the same (or similar to) one I mentioned
> a few months ago but had some trouble reproducing at the time. I
> thought it was related to importing older IB files, but I can make it
> happen with any.
>
> Create a pop-up button. Set it to "pull down" mode. The first menu
> item is hidden, as it should be. Drag a new menu item to the menu. It
> will cause all items except the one dragged in to be set to "hidden".
> If you don't notice this then the items obviously don't show up at
> runtime. You can select all and set them to visible, then go back and
> set the first item back to hidden as a workaround.
>
> G.
>
>
>
> On 1 May 2008, at 10:37 am, Peter Ammon wrote:
>>
>> On Apr 30, 2008, at 3:58 PM, John Stiles wrote:
>>
>>> I've been trying to create an NSPopUpButton in IB3, in pull-down mode,
>>> that has a submenu. It doesn't seem to work properly though. After I
>>> drag in the "Menu >" item into the pop-up button's menu, the pop-up
>>> seems to be irrevocably broken-it randomly neglects to display some
>>> items, or fails to show a menu at all when clicked. Even after removing
>>> the submenu, oftentimes the button is left in a weird state and
>>> needs to
>>> be completely deleted and rebuilt in order to function normally again.
>>>
>>>
>>>
>>> Is this a known issue? I vaguely remember that pop-up buttons
>>> "shouldn't" have submenus, but I'm not sure that was supposed to apply
>>> to pull-down buttons, and IB3 certainly isn't enforcing any limitation
>>> here. All the same, the behavior is clearly broken.
>>>
>>>
>>>
>>> I can file a radar if needed.
>>
>> Hi John,
>>
>> I'm not familiar with the problems you mention; please file a bug.
>>
>> Thanks,
>> -Peter
> -
Yup, that was the problem. Thanks for figuring this out, Graham.
rdar://5903558 [IB3] Items in pull-down-style NSPopUpButtons enable
"hidden" for no reason
John Stiles wrote:> Oh, is that the problem? I didn't see a Hidden checkbox. I'll look again.
> Guess it's Radar time.
>
> Graham Cox wrote:
>> I can confirm this bug, it's the same (or similar to) one I mentioned
>> a few months ago but had some trouble reproducing at the time. I
>> thought it was related to importing older IB files, but I can make it
>> happen with any.
>>
>> Create a pop-up button. Set it to "pull down" mode. The first menu
>> item is hidden, as it should be. Drag a new menu item to the menu. It
>> will cause all items except the one dragged in to be set to "hidden".
>> If you don't notice this then the items obviously don't show up at
>> runtime. You can select all and set them to visible, then go back and
>> set the first item back to hidden as a workaround.
>>
>> G.
>>
>>
>>
>> On 1 May 2008, at 10:37 am, Peter Ammon wrote:
>>>
>>> On Apr 30, 2008, at 3:58 PM, John Stiles wrote:
>>>
>>>> I've been trying to create an NSPopUpButton in IB3, in pull-down mode,
>>>> that has a submenu. It doesn't seem to work properly though. After I
>>>> drag in the "Menu >" item into the pop-up button's menu, the pop-up
>>>> seems to be irrevocably broken-it randomly neglects to display some
>>>> items, or fails to show a menu at all when clicked. Even after
>>>> removing
>>>> the submenu, oftentimes the button is left in a weird state and
>>>> needs to
>>>> be completely deleted and rebuilt in order to function normally again.
>>>>
>>>>
>>>>
>>>> Is this a known issue? I vaguely remember that pop-up buttons
>>>> "shouldn't" have submenus, but I'm not sure that was supposed to apply
>>>> to pull-down buttons, and IB3 certainly isn't enforcing any limitation
>>>> here. All the same, the behavior is clearly broken.
>>>>
>>>>
>>>>
>>>> I can file a radar if needed.
>>>
>>> Hi John,
>>>
>>> I'm not familiar with the problems you mention; please file a bug.
>>>
>>> Thanks,
>>> -Peter
>>


