Page 20 of 25

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Mon Sep 19, 2011 7:00 am
by kikito
:neko: I'm glad I can help. Stateful is the next thing I'll update - either this week or the next one.

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Mon Sep 19, 2011 7:09 pm
by bartbes
No Class Commons? I am disappoint.

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Mon Sep 19, 2011 8:24 pm
by kikito
It's on my list! But I need to do this first, sorry :)

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Mon Oct 10, 2011 2:59 am
by TechnoCat
kikito wrote::neko: I'm glad I can help. Stateful is the next thing I'll update - either this week or the next one.
:(

EDIT: Actually, I see you have been updating it. I'll see what is wrong.
EDIT2: OH! stateful is its own separate repo now. Gotcha. And it works.

Code: Select all

Stateful = require 'stateful.stateful'
t7XBM.png
t7XBM.png (418.76 KiB) Viewed 232 times

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Mon Oct 10, 2011 6:05 am
by kikito
Hi technocat,

I'm afraid that I haven't been able to release it yet. Sorry about that. I've been a bit ill and real life had me working on other things.

It's approaching completion, though. The main functionality is already there - only secondary stuff is left (for example, callbacks are not invoked when popAllStates is called; isInState isn't implemented, and states are not included in mixins - althought I might leave that one out)

As a side note, I've decided that from now on it will be my policy to not provide a folder, but a self-contained file for all my libs. This way you will not need a require 'stateful.stateful' (which in some cases gives trouble to physfs) but simply require 'stateful'.

Regards, and apologies for the delay!

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Mon Oct 10, 2011 6:47 am
by TechnoCat
kikito wrote:Hi technocat,

I'm afraid that I haven't been able to release it yet. Sorry about that. I've been a bit ill and real life had me working on other things.

It's approaching completion, though. The main functionality is already there - only secondary stuff is left (for example, callbacks are not invoked when popAllStates is called; isInState isn't implemented, and states are not included in mixins - althought I might leave that one out)
My minuscule needs seem to have already been met. It seems to work without any problems.
I made this with middleclass 2.0 and the new stateful. (and Tween)

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Fri Oct 14, 2011 2:46 am
by TechnoCat
Do class declarations have to be global?
xIJBO.png
xIJBO.png (361.03 KiB) Viewed 230 times
I tried doing this and it keeps giving me an upvalue boolean error when I require it in another file and do :new on the returned object.

Code: Select all

local Shmup = class('Shmup')

function Shmup:initialize()
end

function Shmup:update(dt)
end

function Shmup:draw()
end

return Shmup

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Fri Oct 14, 2011 6:59 am
by kikito
TechnoCat wrote:Do class declarations have to be global?
As far as I know, no.
TechnoCat wrote:I tried doing this and it keeps giving me an upvalue boolean error when I require it in another file and do :new on the returned object.
That is weird.

Can you include inspect.lua in your main and print the Shmup variable on the console?

Code: Select all

local inspect = require 'inspect'
local Shmup = require 'Shmup'
puts(inspect(Shmup))
Does it work if you make Shmup global?

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Fri Oct 14, 2011 7:53 am
by Robin
You spend too much time with Ruby. :P

Re: middleclass & extras: middleclass 2.0 is out!

Posted: Fri Oct 14, 2011 9:19 am
by kikito
That is impossible :ultrahappy: