I am trying to create script in maxscript with usage of dot.net. I have dataGridView form with comboBoxes. Problem is when i try to register event handlers for every combobox.
I tried the approach from official faq here:
In my rollout there is dotNetControl lbxLoadedMaterials with following event:
-- lbxLoadedMaterials is dataGridView on lbxLoadedMaterials EditingControlShowing args do ( local control = args.Control if control != undefined then ( dotNet.RemoveEventHandler control "SelectedIndexChanged" ::g_MaterialLibraryDesigner.ComboBoxIndexChanged dotNet.addEventHandler control "SelectedIndexChanged" ::g_MaterialLibraryDesigner.ComboBoxIndexChanged dotNet.setLifeTimeControl control #dotnet ) )
in ::g_MaterialLibraryDesigner there is my method for checking index:
public function ComboBoxIndexChanged sender args = ( print "test write" print args ),
The problem is, that event is not firing, not even errors appears.
Does anyone know, where the problem lies?
Thanks a lot!