You missed a step on the plugin code:
You have this:
PluginLibrary::Open( lua\_State \*L ) { // Register \_\_gc callback const char kMetatableName[] = \_\_FILE\_\_; // Globally unique string to prevent collision CoronaLuaInitializeGCMetatable( L, kMetatableName, Finalizer ); // Functions in library const luaL\_Reg kVTable[] = { { "init", init }, { "show", off }, // \<----- needs to be "off" not "show" { "show", on }, // \<----- needs to be "on" not "show" { NULL, NULL } }; // Set library as upvalue for each library function Self \*library = new Self; CoronaLuaPushUserdata( L, library, kMetatableName ); luaL\_openlib( L, kName, kVTable, 1 ); // leave "library" on top of stack return 1; }
See if that takes care of it.
Rob