Editing default NSMenu

Discussion in 'Mac Programming' started by jsnuff1, Dec 18, 2010.

  1. jsnuff1 macrumors 6502a

    Oct 4, 2003
    I have a NSTextVew which I want to add a few menu items to it's default menu it shows when you right click on the text view (the cut copy past etc menu).

    I have tried attaching my custom menu to the NSTextView menu outlet in IB, and it correctly adds my items, but it gets rid of all the other menu items except for Search in Spotlight, Search in Google, and Lookup in Dictionary.

    How can I got about adding my items without removing any of the default items in the menu?
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    You might well be able to do it programatically at runtime: don't assign a new menu, access the NSMenu at runtime and add/remove items.

Share This Page