OnContextMenu and MM Debug Version

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

MPG
Posts: 418
Joined: Tue May 13, 2008 11:22 pm

OnContextMenu and MM Debug Version

Post by MPG »

Hi,
Have an interesting problem. I am working with a debug version of MM and I am using my SpellCheck add-on. It has a oncontextmenu to provide a list of possible replacements for misspelled words. With the debug version, my context menu isn't being fired, instead the debug menu is being displayed.

Is there any way to:
1) Have MM contextmenu added to my contextmenu?
2) Stop the MM contextmenu from being fired?
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: OnContextMenu and MM Debug Version

Post by drakinite »

MM's context menu handlers are a bit convoluted; it would help to clarify where the context menus are being created. Is it on tracklists, i.e. the user clicks on a track in the list and the spell check will automatically run and show if there's a spelling error?

If that's the case, I would recommend adding to uitools.tracklistMenuItems (defined in controls/trackListView.js) - and you can control either the visible or the (don't remember if it's enabled or disabled) attributes depending on your preference. (They can be functions; return true or false depending on whether you want the context menu item to be visible and/or grayed out)
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: OnContextMenu and MM Debug Version

Post by drakinite »

If you want an example of an addon with a custom context menu handler, check out controls/FlowAlbumView.js in the 3D album view addon I made. I added some comments to help explain what I did.
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
MPG
Posts: 418
Joined: Tue May 13, 2008 11:22 pm

Re: OnContextMenu and MM Debug Version

Post by MPG »

Hi Drakinite,
It's on my SpellCheck Add-On that's available on the site. The context menu is opened on my form dlgSpellCheck.html.
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
Post Reply