OnContextMenu and MM Debug Version

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: OnContextMenu and MM Debug Version

Re: OnContextMenu and MM Debug Version

by MPG » Sat Dec 25, 2021 8:05 pm

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.

Re: OnContextMenu and MM Debug Version

by drakinite » Sat Dec 25, 2021 8:03 pm

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.

Re: OnContextMenu and MM Debug Version

by drakinite » Sat Dec 25, 2021 8:01 pm

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)

OnContextMenu and MM Debug Version

by MPG » Fri Dec 24, 2021 11:24 am

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?

Top