Add (or Keep) the Mac Dictionary "Look Up" MenuItem to custom Contextual Menu

I’ve got the hang of using custom contextual menus for various inputs like the TextArea control.

From everything I’ve read and experimented with, when adding a custom Context Menu on macOS, your new menu replaces the built-in Context Menu (it appears to be an either/or kind of thing). And on macOS that means loosing the fancy “extra” options that get included on standard Context Menus (depending on the control).

Loosing those fancy options is both good and annoying, depending on the situation. So now I’m looking on how to keep or add just one of those fancy macOS options - namely the local Dictionary “Look Up” MenuItem, as shown below.

Either I’m just doing things wrong, but is there a way to keep or add just that one “Look Up” menu option? Either via Declares or MBS? I searched and read and now my head aches, a lot.

Many of the other fancy options could be replicated I’m sure, but the Lookup one seems kinda special - and I’ve always really liked that feature of macOS, so I’d like to include it in my app(s), where applicable.

Any insight would be appreciated. Thank you.

Some success, yeah!

I did search the MBS site yesterday quite a bit, but because the Dictionary datatype is used in so many variables and parameters it made it time consuming to eventually find DictionaryServiceMBS. This is not a criticism of the site, but more a testimony to how extensive the work @Christian Schmitz has done :slight_smile:

I still need to play with the example code a bit, because I can’t get all the features working just yet, but a straight word lookup does work once you compile to 64-bit (2019r2.1 & 2019r3). I’ll communicate with Christian if I get stuck.

I’ll have to build my own UI I guess, which may not be as elegant as what macOS has built-in, but maybe that’ll eventually lead me to a common UI for Windows, if I can eventually get something similar working there (fingers-crossed).

I’ll do my best to provide any finished working code and/or example project here, if I get things to the point I’m happy with it all.

Please still chime in if anybody has any additional suggestions. Thanks.