Permalink
Browse files

WaxClass's used to have a var called name, not it is className

  • Loading branch information...
1 parent f137805 commit 2dbac2e47fe7550b8a4e2a796c135fafcda091cc @probablycorey committed Jun 24, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 lib/stdlib/waxClass.lua
@@ -9,34 +9,34 @@ function waxInlineClass(options)
local className = options[1]
local superclassName = options[2]
local class = wax.class(className, superclassName)
- class.name = className
-
+ class.className = className
+
if options.protocols then
if type(options.protocols) ~= "table" then options.protocols = {options.protocols} end
if #options.protocols == 0 then error("\nEmpty protocol table for class " .. className .. ".\n Make sure you are defining your protocols with a string and not a variable. \n ex. protocols = {\"UITableViewDelegate\"}\n\n") end
end
for i, protocol in ipairs(options.protocols or {}) do
wax.class.addProtocols(class, protocol)
- end
+ end
class._M = setmetatable({
self = class,
},
{
- __newindex = function(self, key, value)
+ __newindex = function(self, key, value)
class[key] = value
end,
-
- __index = function(self, key)
+
+ __index = function(self, key)
return class[key] or _G[key]
end,
-
+
}
)
_G[className] = class
package.loaded[className] = class
-
+
return class
end

0 comments on commit 2dbac2e

Please sign in to comment.