tabbed_window cannot close themselves

Posted by RedL on Fri 18 May 2018 02:02 PM — 3 posts, 14,522 views.

China #0
When I require "tabbed_window" and loading Tab_module_test.xml,it work!Show me two miniwindows.
But when I remove this plugin, there is problem:The miniwindows didnot close and cannot click. What's the problem?
Australia Forum Administrator #1
That plugin did not allow for hiding the windows if you closed it or disabled it. If you add the following lines to the end of the script (after OnPluginSaveState) then it will:



function OnPluginClose ()
    -- if enabled
    if GetPluginInfo (GetPluginID(), 17) then
        OnPluginDisable()
    end -- if enabled
end -- function OnPluginClose

function OnPluginEnable ()
    WindowShow (context1.win, true)
    WindowShow (context2.win, true)
end -- function OnPluginEnable


function OnPluginDisable ()
    WindowShow (context1.win, false)
    WindowShow (context2.win, false)
end -- function OnPluginDisable


Basically that hides the windows in the two context tables that have been set up.

See here for a simple alias that will close any miniwindows left lying around:

http://www.gammon.com.au/forum/?id=9694





Quote:

... and cannot click ...


You can't click on them because you removed the underlying code that handles the clicks.




I've amended the plugin to have that code:

http://www.gammon.com.au/forum/?id=14161&reply=4#reply4
Amended on Sun 20 May 2018 03:31 AM by Nick Gammon
China #2
Thank for your help.

I think I need learn more about MUSHclient and LUA.

Thanks again.