How to uncache Commander menu items

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to uncache Commander menu items

Tim Mackinnon
I was going to write this question - but Denis pinged me on Discord - however I thought I would lob this into the list in case someone else hits the problem and is searching for it. (Maybe I should stick this in Calypso or Commander faq).

My problem was that I had built a sub menu in Calypso and specified the order of the menu items as described in the docs.
packageContextMenuActivation
        <classAnnotation>
       
        ^ CmdContextMenuActivation
                byItemOf: ClyExercismMenuGroup
                order: self contextMenuOrder
                for: ClyTaggedClassGroup asCalypsoItemContext

However when I went to add some icons and change the ordering I was finding that my menu wasn’t updating. There are 2 solutions (one better than the other).

The brute force way is: CmdContextMenuActivation resetCache.

The elegant way was to add an annotation to my menu ordering method

contextMenuOrder
        <classAnnotationDependency>
       
                ^1


Tim

By the way - to see what icons you can use in your menus, inspect: ThemeIcons current