middleclass & extras: middleclass 3.0 is out!

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by TechnoCat »

Here is a love instead.
Attachments
message-in-a-bottle.love
0.7.0
(11 KiB) Downloaded 102 times
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by kikito »

lol. I wasn't quick enough.

I take you are using love 0.7. On my system (0.6.2 still) the text seems a bit too 'up'.
When I write def I mean function.
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by zac352 »

kikito wrote:lol. I wasn't quick enough.

I take you are using love 0.7. On my system (0.6.2 still) the text seems a bit too 'up'.
Isn't that due to the text placement update?
Hello, I am not dead.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by kikito »

Precisely.
When I write def I mean function.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by kikito »

Things have been a bit slow these days due to changes in my real-life work-load and my new cat (she is called Lua, as I mentioned in another post :P )

Anyway, today I've done some important changes in middleclass & middleclass-extras. These changes might affect you.

In middleclass:
  • The filename has changed from MiddleClass.lua to middleclass.lua, for easier requiring (the complete lib or just the file). This can cause some trouble if you are not careful, specially if you use windows - the folder will work, but the zip file may not. Beware!
  • I've moved all the specs to a dedicated github project. This makes middleclass much smaller and easier to include (cloning the whole dir doesn't seem like a bad idea now).
  • Indeed, cloning the whole dir is now the recommended way to use middleclass. If anything, it will save you the hassle of having to copy the license file somewhere.
  • On this regard, I've also created a small init.lua file that just loads middleclass.lua. Why did I do this? Because it's kind of an unspoken standard to call 'init.lua' the file that 'loads up' a module. I've made a proposal for including ?/init.lua by default on love's package.path. This should allow you to do require 'middleclass' instead of require 'middleclass.init'
  • I've updated the README file, removing deprecated stuff and adding new stuff.
  • Also, this can be considered version 1.1 of middleclass.
In middleclass-extras:
  • Also moved all specs to middleclass-specs
  • middleclass isn't included any more inside middleclass-extras. Before you could do this:

Code: Select all

require 'middleclass-extras.init'
Now you have to do this:

Code: Select all

require 'middleclass.init'
require 'middleclass-extras.init'
and download middleclass separatedly. I believe this is clearer and simpler.

middleclass-extras is still not 1.0, but it's pretty close. I'd say it is 0.9 right now. It'll be 1.0 when I'm able to integrate it with PÄSSION, which I have already started doing (lots of things to test and mend!)
When I write def I mean function.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by Robin »

Uh oh, more changes that will mess up my projects…

BTW, cloning the whole thing (if you're referring to git-clone) will still need to download the specs, because they're still in the repository.
Help us help you: attach a .love.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by TechnoCat »

Robin wrote:Uh oh, more changes that will mess up my projects…

BTW, cloning the whole thing (if you're referring to git-clone) will still need to download the specs, because they're still in the repository.
clone the two child repositories.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by Robin »

TechnoCat wrote:clone the two child repositories.
I'm not sure what you're referring to, but if you do a git clone git://github.com/kikito/middleclass.git, you'll have to clone the complete history, including all removed files, because git is a distributed VCS. Not that the specs (or some things now in middle-class-extras, which is still there as well) are that large, of course.
Help us help you: attach a .love.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: middleclass & middleclass-extras: OOP for LUA

Post by kikito »

Robin wrote:Uh oh, more changes that will mess up my projects…
Well, yes. Sorry :)
Robin wrote:BTW, cloning the whole thing (if you're referring to git-clone) will still need to download the specs, because they're still in the repository.
Well said. I'm just going to assume that the git guys are very clever and store the old files as deltas compressed with magic unicorn blood so it isn't really a big deal.

In any case, rm -rf .git should solve that. But then you would not be able to do git pull to get the changes automatically. And that is so convenient.

And there's also the option of using the git download service.

I'll probably have to include all that on the README, won't I ? -__-
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest