What is the selector (or object) that creates the pop-up menu of a documents entry structure (as used by the "move to..." or "link to..." or "contained by" items?
Thanks
Jeff
|
|
Entry Tree pop-up Menu
Submitted by BMEguy on Mon, 2007-04-23 19:21.
Tags ( Plugin Development )
What is the selector (or object) that creates the pop-up menu of a documents entry structure (as used by the "move to..." or "link to..." or "contained by" items? Thanks |
Those menu's are dynamic and
Those menu's are dynamic and use a MIEntryHierarchyMenuController to populate the contents. This is the code from MIUserInterfaceMenuMenuExtension that creates the move to menu:
MIEntryHierarchyMenuController *entryHierarchyMenuController = [MIEntryHierarchyMenuController frontmostDocumentInstance];
NSMenuItem *moveToItem = [[[NSMenuItem alloc] initWithTitle:BKLocalizedString(@"Move To", @"") action:@selector(moveTo:) keyEquivalent:@""] autorelease];
[entryHierarchyMenuController buildAndAttachEntryHierarchySubmenuForMenuItem:moveToItem];
[menuController insertMenuItem:moveToItem insertPath:@"/Entry/MoveGroup"];
[menuController declareMenuItem:moveToItem menuItemPath:@"/Entry/MoveToItem"];