Hi Gabriel,
On 01.06.2020 16:51, Jacek Caban wrote:
On 01.06.2020 14:21, Gabriel Ivăncescu wrote:
Or maybe script module should just store ScriptHost reference.
It wouldn't change much and we need a ref to the control anyway (to start the script for example).
I would need a deeper look to be sure, but it seems to me that it would solve all your problems by not having to store control reference in modules. Starting script doesn't really need control. It currently needs it only to access script host and check control state. Control state could be reworked to not require it (test_State() on emulated script engine would be interesting for such rework).
I tested it myself and, as suspected, we don't need control object to start the script engine. I send patches for that. I hope it helps.
Jacek