Re: import lua?
Posted: Thu Jun 29, 2017 2:42 pm
Oh Jor'Mox, you are right. I didn't even bother to check just yet, but would not have expected that. Looking at Mudlet code base, those are indeed completely different things:
Clicking a new folder in the GUI will invoke dlgTriggerEditor::slot_add_new_folder() which will in case of triggers invoke dlgTriggerEditor::slot_addTriggerGroup() and that then addTrigger(true). The "true" means, create a folder, "false" would create a trigger. No other parameters are supplied, instead probably taken directly from GUI. My C++ is too weak to understand it all exactly now.
On the other hand, looking at the command permGroup - first the good news, it seems to actually take an optional third parameter for parent! This has not been reflected in manual, yet, but I can see it in code. Nice!
Looking at code history, it seems to be you Jor'Mox who added that optional parent parameter? So should we update manual as well? Are there any other improvements you did but which are not yet in the manual in wiki?
However still, calling permGroup(name, "trigger") for example will be directly invoking permSubstringTrigger(name, parent, {""}, "") and not create a "real" group like the button above, after all.
I wonder if my C++ would suffice to link the functionality of those commands to what is happening when clicking the buttons in GUI, as well as including all the other missing things mentioned above. Reviewing how SecareLupus included Keys, this may be a bit above my level still.
edit: Updated the permGroup() wiki manual
Clicking a new folder in the GUI will invoke dlgTriggerEditor::slot_add_new_folder() which will in case of triggers invoke dlgTriggerEditor::slot_addTriggerGroup() and that then addTrigger(true). The "true" means, create a folder, "false" would create a trigger. No other parameters are supplied, instead probably taken directly from GUI. My C++ is too weak to understand it all exactly now.
On the other hand, looking at the command permGroup - first the good news, it seems to actually take an optional third parameter for parent! This has not been reflected in manual, yet, but I can see it in code. Nice!
Looking at code history, it seems to be you Jor'Mox who added that optional parent parameter? So should we update manual as well? Are there any other improvements you did but which are not yet in the manual in wiki?
However still, calling permGroup(name, "trigger") for example will be directly invoking permSubstringTrigger(name, parent, {""}, "") and not create a "real" group like the button above, after all.
I wonder if my C++ would suffice to link the functionality of those commands to what is happening when clicking the buttons in GUI, as well as including all the other missing things mentioned above. Reviewing how SecareLupus included Keys, this may be a bit above my level still.
edit: Updated the permGroup() wiki manual