[ZeroBrane Studio] Re: Debugging interoperation with middleclass.lua

  • From: Rob Probin <rob.probin@xxxxxxxxx>
  • To: zerobrane@xxxxxxxxxxxxx
  • Date: Thu, 13 Mar 2014 07:02:49 +0000

On 12/03/2014 23:22, Paul K wrote:
Hm, both of these work for me. I'm running the latest middleclass from github:

local Person = class('Person')
function Person:initialize(name) self.name = name end
function Person:speak() print('Hi, I am ' .. self.name ..'.') end

print(Person)
local person = Person()
print(person)
print(tostring(person))

-- output
class Person
instance of class Person
instance of class Person

Or am I doing something differently?

Paul.
Have you got the serialize method I added?


Other related posts: