title: LuaBridge and Member Functions
body: <p>I just downloaded  <strong>LuaBridge</strong> today and am very satisfied with it so far. One thing I've noticed is that I'm able to circumvent the normal requirement of having a lua_State as a function parameter.</p>
  
  <p>I can do this:</p>
  
  <pre><code>//C++ files
  void love(int i) {std::cout &lt;&lt; i;}
  
  luabridge::getGlobalNamespace(lua)
    .addFunction("love", love);
  
  -- Lua file
  love(8)
  </code></pre>
  
  <p>and it will work just fine, but if I do anything to the effect of:</p>
  
  <pre><code>//C++ files
  struct Tester {
    int number;
    void MemFunction (int i) { std::cout &lt;&lt; i;}
    static void Register(lua_State*); 
  };
  
  void Tester::Register(lua_State *lua) {
    luabridge::getGlobalNamespace(lua)
      .beginClass&lt;Tester&gt;("Tester")
      .addConstructor &lt;void (*) (void)&gt; ()
      .addData("number", &amp;Tester::number)
      .addFunction("MemFunction", &amp;Tester::MemFunction)
   .endClass();
  }
  
  --Lua file
    c = Tester()      -- works...
    c.number = 1      -- works...
    c.MemFunction(10) -- nothing!
  </code></pre>
  
  <p>Nothing I've read in the documentation indicates that member functions with non-lua_State arguments can't be registered, and I've seen some LuaBridge code doing just this with no problem. What am I doing wrong here?</p>