Trying to add a event listener fo a object which is part of an array in lua using corona
===

The main creates a simple 2d array. Now i want to create a addeventlistener for each object in the table. I presume i do this in the class? Although i have created a taps function and then defined addeventlistener but i ma getting errors.


    --main.lua--
    grid={}
    for i =1,5 do
	grid[i]=  {}
	for j =1,5 do
			
			grid[i][j]=diceClass.new( ((i+2)/10),((j+2)/10))
		end
    end
    --dice class--
    local dice = {}
    local dice_mt = { __index = dice } -- metatable

    
    function dice.new( posx, posy) -- constructor
	local a=math.random(1,6)
	local b= true
	local newdice = display.newText(a, display.contentWidth*posx,
        display.contentHeight*posy, nil, 60)
	--newdice:addEventListener("tap", taps(event))

	return setmetatable( newdice, dice_mt )
    end


    function dice:taps(event)
	self.b = false
	print("works")
    end
    function dice:addEventListener("tap", taps(event))