Commits

Chris Klimas  committed 2eee498

Add strict check for binding against an object method

  • Participants
  • Parent commits f315563

Comments (0)

Files changed (1)

File zoetrope/core/cached.lua

 	bind = function (self, obj, func, ...)
 		local arg = {...}
 
+		if STRICT and type(func) == 'string' then
+			assert(type(obj[func]) == 'function', 'asked to bind an object to a non-existent method named ' .. func)
+		end
+
 		-- look for previous bind
 		
 		for key, value in pairs(self._library.binds) do
 				end
 
 				if match then
-					print('found existing bind for ', obj, func, arg)
 					return value
 				end
 			end