nsmenu
Memory management when updating the items in a NSMenu
I\'d like to know if this is the correct way to avoid a memory leak in a Cocoa app. My app has a method that updates an NSMenu\'s items:[详细]
2023-04-11 08:09 分类:问答Print Menu Item enabled/disabled for various NSWindowControllers
I have changed my Print menu item to send the -printWindow: message to First Responder and defined that method on two of my window controllers (my primary and a secondary window). On my primary window[详细]
2023-04-11 02:55 分类:问答Updating A Dynamically Created NSMenu with NSMenuItems
I have a NSMenu with 3 static NSMenuItems that I want to keep, and a bunch after that are dynamically generated and should be removed and reloaded each time the user clicks the menu icon.[详细]
2023-04-05 01:49 分类:问答NSMenu's mouse over event
I used NSMenu and NSStatusItem to display custom menu on status bar for a long time in this way: statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:18] retain];[详细]
2023-03-31 09:17 分类:问答Populate a NSMenu from an NSArray with NSMenuItems - Need Alternative Suggestions
So I have the following code: - (void)addSupportLinksMenuItems { NSString *subMenuTitle; NSString *getURL;[详细]
2023-03-30 04:53 分类:问答How can I get a NSMenuItem from a submenu?
I have a reference to the o开发者_如何转开发utermost menu, but I\'m trying to get a reference to an NSMenuItem that\'s nested in a submenu:[详细]
2023-03-23 05:40 分类:问答Creating NSMenu with NSMenuItems in it, programmatically?
First, I\'d like to point out that this question is probably already asked, I just couldn\'t find any answers from them.[详细]
2023-03-21 00:24 分类:问答How to remove NSMenuItem gap above custom view
I was looking for something discussed in following posts. Gap above NSMenuItem custom view. Reverse engineering an NSMenu for a Status Bar Item[详细]
2023-03-18 05:40 分类:问答How to keep focus on NSStatusItem until toggling it again
I\'m building an app the uses a NSStatusItem. I\'m wanting my NSStatusItem to open when clicked and stay open until the user clicks the NSStatusItem again. As of right now, it opens the menu but the N[详细]
2023-03-16 09:34 分类:问答Cocoa: Auto close a status menu
I hava a status menu on the status bar, and I have some tasks running behind the scene. When one of task is done, assume at the time the menu is being showed (dropped down), I want to make the menu to[详细]
2023-03-12 06:48 分类:问答