Disabled PopUpButton With Action

  • I have placed a NSPopUpButton on a window and connected it to an action in
    the instance of my AppController in Interface Builder (v 2.5.3 in Tiger).
    When I run my application, the popup menu will display the list of items but
    every one of them is disabled. There has got to be something simple that I
    am missing. Can someone tell me what I am doing wrong?
    Thanks,
    Jason
  • On 2007 Dec, 21, at 16:47, Jason Barker wrote:

    > I have placed a NSPopUpButton on a window and connected it to an
    > action in
    > the instance of my AppController in Interface Builder (v 2.5.3 in
    > Tiger).
    > When I run my application, the popup menu will display the list of
    > items but
    > every one of them is disabled. There has got to be something simple
    > that I
    > am missing. Can someone tell me what I am doing wrong?

    I vaguely remember having a problem like this once, and possibly the
    cause was an object implementing -validateMenuItem: and returning NO
    for unknown items.

    But I can't find any such comments in my code, so I'm not sure.  Read
    this document:

    Guides > Cocoa > User Experience > Application Menu and Pop-up List
    Programming Topics for Cocoa > Enabling Menu Items
  • That did the trick! I had to add each menu item to -validateMenuItem: and
    return YES.
    Thanks for your help!
    Jason

    On Dec 21, 2007 10:10 PM, Jerry Krinock <jerry...> wrote:

    >
    > On 2007 Dec, 21, at 16:47, Jason Barker wrote:
    >
    >> I have placed a NSPopUpButton on a window and connected it to an
    >> action in
    >> the instance of my AppController in Interface Builder (v 2.5.3 in
    >> Tiger).
    >> When I run my application, the popup menu will display the list of
    >> items but
    >> every one of them is disabled. There has got to be something simple
    >> that I
    >> am missing. Can someone tell me what I am doing wrong?
    >
    > I vaguely remember having a problem like this once, and possibly the
    > cause was an object implementing -validateMenuItem: and returning NO
    > for unknown items.
    >
    > But I can't find any such comments in my code, so I'm not sure.  Read
    > this document:
    >
    > Guides > Cocoa > User Experience > Application Menu and Pop-up List
    > Programming Topics for Cocoa > Enabling Menu Items
    >
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today