Page 2 of 2

Re: maybe im just nit picking...

Posted: Fri Apr 25, 2014 1:54 pm
by hairy puppy
from the look of it, it was not going to be 'on_something', but more 'onSomething'
though i get what you mean, but that actually makes sense to me, but then again i have not used love2d more than a week yet ;)

Re: maybe im just nit picking...

Posted: Fri Apr 25, 2014 3:08 pm
by Ref
Really notConcerned if isKnown.

Re: maybe im just nit picking...

Posted: Sun Apr 27, 2014 9:59 pm
by Inny
OttoRobba wrote:
Inny wrote:I'd go one step further and ask why the callbacks aren't subscriptions

Code: Select all

love.on_update(function(dt)
    inny.writes.too.much:javascript()
end)
Image
Oh I can go worse

Code: Select all

local handlers = { update = {} }
function love.update(dt)
    for _, h in ipairs(handlers.update) do
        h(dt)
    end
end
function on(topic, callback)
    table.insert(handlers[topic], callback)
end
love.on('update', function(dt)
    inny.is.an.evil:madman()
end)
Mwahaha

Yeah in retrospect this was a bad idea, I withdraw my original gripe.