dhtmlx contextMenu

I’m creating a dijit widget for the gantt, however
QN1. the context menu is failing to load.

I’m using strict /secure javascript with

I get this error message:

I’ve imported the libraries in the order:

"dhtmlx/lib/ext/dhtmlxSuite/dhtmlx", "dhtmlx/lib/dhtmlxgantt", "dhtmlx/lib/ext/dhtmlxgantt_critical_path", "dhtmlx/lib/ext/dhtmlxgantt_auto_scheduling", "dhtmlx/lib/ext/dhtmlxgantt_undo", "dhtmlx/lib/ext/api"

QN2. also I notice the js keeps giving other errors like:

"404 - file not found for file: widgets/dhtmlx/lib/sources/ext/dhtmlxgantt_critical_path.js.map" "404 - file not found for file: widgets/dhtmlx/lib/sources/ext/dhtmlxgantt_auto_scheduling.js.map" "404 - file not found for file: widgets/dhtmlx/lib/sources/ext/dhtmlxgantt_undo.js.map".
Do we need these “.js.map” files ?

“dhtmlXMenuObject” should be available if dhtmlx.js is attached to page. What dhtmlx version are you using?
“.map” files is source map files (It used only for debug). It should work fine without them. But your package should contain these files in sources folder.

I’m using version 4.1.2 for dhtmlx.js which came along with licensed dhtmlxgantt version 4.0.0
I can do critical path, filtering, zooming, exporting, auto scheduling successfully.
however when I try out the contextMenu. I get that error.

"ReferenceError: dhtmlXMenuObject is not defined"

on the line: var menu = new dhtmlXMenuObject();
I’m suspicious this could be due to incorrect definition of “dhtmlXMenuObject” in “samples/common/dhtmlxSuite/dhtmlx.js”. Especially that I’m using javascript in strict mode “use-strict”.

Hello,

Please check the demo with onContextMenu event:
docs.dhtmlx.com/gantt/samples/04 … _menu.html