You're welcome, Wes! For you (when/if the time allow, of course) and those interested, the EXACT steps (assuming Lukas' script is installed) to reproduce the crash under this kind of modeless window scenario is as follows:
- In a fresh Moho instance, create a new document and add a Bone layer to it (this is only to ensure you can select a Select Bone tool in the next step).
- Well, now with the just created Bone layer active, simply select the Select Bone tool (it could be any tool with a dialog) if it's not been auto-selected yet.
- Open the LayerFinder window and press e.g. its arrow buttons just to see they respond and change as expected.
- Now, select any other tool like e.g. Transform Layer, and check that the window's controls/buttons still respond as expected (they should).
- BUT, again, select the Select Bone tool again and test the buttons one more time; they have stopped to respond...
- Well, close the dialog window, select any other tool and Moho will crash.
These order of events, along with the Lua Console clue, were very important to get what & when could be going on, so there they are for the record (now that I still could hardly remember them) just in case they also help for a fix. Well, up to this point, now one could simply add the one-line workaround in this case at the bottom of the script (which is the typical use case anyway) as follows:
Code: Select all
-- **************************************************
-- The guts of this script
-- **************************************************
function LK_LayerFinder:Run(moho)
if self.dialog == nil then
self.dialog = LK_LayerFinderDialog:new(moho)
self.dlogBypass = LK_LayerFinderDialog:new(moho) self.dlogBypass = nil --JUST COMMENT AND UNCOMMENT THIS ONLY LINE AND RELAUNCH/RELOAD TO CHECK THE DIFFERENCE!
self.dialog:DoModeless()
end
end
And the unresponsive controls plus the systematically subsequent crash should stop happening, or at least that's what I've been getting in the last few days of thoroughly testing it. But of course the more people can confirm under different use cases the better because with workarounds you never know...
In any case! All this modeless thing is so exciting... Wes, you are one of the big ones and I'm sure you enjoy doing it (well, I guess most of the time as all of us

), so I hope you can find such time for scripting again at any appropriated point for you, for yours and everyone's benefit. Cheers!
...