way to update Apple Menu's Recents Items

  • Hi,

    I can remove the recent items from the plist where they are stored.

    But when I try and update the Recent Items submenu, it doesn't.

    I'm getting Apple Menu by using [[NSApp mainMenu] itemAtIndex:0].

    OR do I need to kill some process (which will then restart) to achieve this.

    Thanks,
    Nick
  • On Mon, May 13, 2013, at 08:50 PM, Nick Rogers wrote:
    > Hi,
    >
    > I can remove the recent items from the plist where they are stored.
    >
    > But when I try and update the Recent Items submenu, it doesn't.
    >
    > I'm getting Apple Menu by using [[NSApp mainMenu] itemAtIndex:0].
    >
    > OR do I need to kill some process (which will then restart) to achieve
    > this.

    Recent Items are managed by Powerbox, and the number of included items
    is set by the user in System Preferences. You should not attempt to
    modify this submenu.

    --Kyle Sluder
  • Hi,

    But a commercially available program is doing it.
    And I have gone through process list in activity monitor before and after "Recent Items" is updated by this program.
    And found no difference in number of processes or any change in PIDs of the processes. Means probably no re-spawning.

    I have to do this.
    Please suggest.

    Wishes,
    Nick

    On 14-May-2013, at 9:30 AM, Kyle Sluder <kyle...> wrote:

    > On Mon, May 13, 2013, at 08:50 PM, Nick Rogers wrote:
    >> Hi,
    >>
    >> I can remove the recent items from the plist where they are stored.
    >>
    >> But when I try and update the Recent Items submenu, it doesn't.
    >>
    >> I'm getting Apple Menu by using [[NSApp mainMenu] itemAtIndex:0].
    >>
    >> OR do I need to kill some process (which will then restart) to achieve
    >> this.
    >
    > Recent Items are managed by Powerbox, and the number of included items
    > is set by the user in System Preferences. You should not attempt to
    > modify this submenu.
    >
    > --Kyle Sluder
  • Read up on NSDocumentController; it's in charge of that menu.

    On 14 May 2013, at 04:50, Nick Rogers <roger_s1...> wrote:

    > Hi,
    >
    > I can remove the recent items from the plist where they are stored.
    >
    > But when I try and update the Recent Items submenu, it doesn't.
    >
    > I'm getting Apple Menu by using [[NSApp mainMenu] itemAtIndex:0].
    >
    > OR do I need to kill some process (which will then restart) to achieve this.
  • On May 14, 2013, at 2:12 AM, Mike Abdullah <cocoadev...> wrote:

    > Read up on NSDocumentController; it's in charge of that menu.

    I don't think this has been the case for an OS revision or two (either since Apple merged the “recent items count” preferences or when they added click-and-hold on Dock icons to reveal all recent items), but it's certainly possible that I'm wrong.

    --Kyle Sluder
  • On May 14, 2013, at 2:12 AM, Mike Abdullah wrote:

    > Read up on NSDocumentController; it's in charge of that menu.

    It's in charge of File-> Recent, but not Apple -> Recent.

    >
    > On 14 May 2013, at 04:50, Nick Rogers <roger_s1...> wrote:
    >
    >> Hi,
    >>
    >> I can remove the recent items from the plist where they are stored.
    >>
    >> But when I try and update the Recent Items submenu, it doesn't.
    >>
    >> I'm getting Apple Menu by using [[NSApp mainMenu] itemAtIndex:0].
    >>
    >> OR do I need to kill some process (which will then restart) to achieve this.
previous month may 2013 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