3 Replies Latest reply on Dec 27, 2009 2:24 PM by scrope601

    Setting global variable that are static but I want them to change

    scrope601

      I'm trying to set a global variable so I can let the user change the state in the Plugin Manager.  I've created a checkbox (in PluginManager.lua)

       

      f:checkbox {

           title = 'Show HTTP response',

           value = _G.showHttpResponse,

      },

       

      that references the global variable (in PluginInit.lua)

       

      _G.showHttpResponse = true

       

      The state of the checkbox accurately reflects the initial value as set.  Everything seems fine but after unchecking the checkbox, the value is always true in my plugin.  I expected _G.showHttpResponse to change to reflect the setting in the checkbox.

       

      What have I overlooked?  Is this only for setting static globals?

       

      Abe