I'm pleased to announce that the specs phase on middleclass is over.
I've just finished doing what I hope will be the last important change on the library, and entering bug-fixing mode.
This means that middleclass has reached v1.0.
The other important news I have is that Mindstate has moved to a separate package: middleclass-extras. She is not alone now. Some items that previously were inside PÄSSION will now make her company - I'm talking about Beholder, GetterSetter, Sender, and Callbacks.
middleclass-extras is *not* v1.0 just yet, but it shouldn't take long. It has tests, and they all pass. I'm just one mixin short - I'm going to call it Apply. I will put the 'apply this to all instances of this class' methods that currently are hardcoded on PÄSSION's Actor class inside this mixin, so they can be shared (Notably, Timers and Cameras would use them).
I'm eager to integrate middleclass-extras with PÄSSION! I'm hoping to do it this week, since I have one day off.
So, if any of you was hesitant about using a 'non-finished' library for object orientation, you don't have any excuse now. Just go grab it!
middleclass & extras: middleclass 3.0 is out!
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: middleclass & middleclass-extras: Object Orientation for
Last edited by kikito on Mon Oct 11, 2010 8:29 am, edited 1 time in total.
When I write def I mean function.
Re: middleclass & middleclass-extras: Object Orientation for
Congratulations on reaching 1.0kikito wrote:This means that middleclass has reached v1.0.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: middleclass & middleclass-extras: Object Orientation for
Why, thanks!
When I write def I mean function.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: middleclass & middleclass-extras: Object Orientation for
I guess it is about time for me to try out this library. Looks like it will become essential to my toolbox.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: middleclass & middleclass-extras: Object Orientation for
That would be great. I'll appreciate any feedback or comments!
When I write def I mean function.
- TylertheDesigner
- Citizen
- Posts: 80
- Joined: Sat Apr 10, 2010 2:27 am
Re: middleclass & middleclass-extras: Object Orientation for
Does Middleclass and middleclass extras work outside of the Love Engine? It seems there is no direct connection to the LOVE API in the code, but I am a noob and may have missed something.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: middleclass & middleclass-extras: Object Orientation for
I believe it is just a Lua library.TylertheDesigner wrote:Does Middleclass and middleclass extras work outside of the Love Engine? It seems there is no direct connection to the LOVE API in the code, but I am a noob and may have missed something.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: middleclass & middleclass-extras: Object Orientation for
Hi TyletheDesigner!TylertheDesigner wrote:Does Middleclass and middleclass extras work outside of the Love Engine? It seems there is no direct connection to the LOVE API in the code, but I am a noob and may have missed something.
All the libraries on this forum thread are completely LÖVE-independant. You can use them on any engine that accepts Lua.
Regards!
When I write def I mean function.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: middleclass & middleclass-extras: Object Orientation for
I have run into a problem.
Whenever I try to call a class function it crashes.
I have two classes: Server and Game.
Server creates a new game object inside itself. (and this is where I think the problem lies, I am not sure if it creates a global or a class variable.)
Then I override the love.update and love.draw functions. It crashes whenever they try to call Game:update() and Game:draw() inside the callbacks. How do I reference the game object correctly? Or, if the problem lies elsewhere, what is incorrect?
server.lua:
game.lua:
Whenever I try to call a class function it crashes.
I have two classes: Server and Game.
Server creates a new game object inside itself. (and this is where I think the problem lies, I am not sure if it creates a global or a class variable.)
Then I override the love.update and love.draw functions. It crashes whenever they try to call Game:update() and Game:draw() inside the callbacks. How do I reference the game object correctly? Or, if the problem lies elsewhere, what is incorrect?
server.lua:
Code: Select all
local Server = NetTest:addState('Server')
function Server:enterState()
clearLoveCallbacks()
--TODO: SERVER INIT CODE
game = Game:new()
function love.update(dt)
--TODO: SERVER NETWORK CODE
game:update(dt) --THIS CAUSES A REFERENCE NIL ERROR
end
function love.draw()
game:draw() --THIS CAUSES A REFERENCE NIL ERROR
end
end
function Server:exitState()
--TODO: SERVER EXIT CODE
end
Code: Select all
Game = class("Game", StatefulObject)
function Game:initialize()
end
--[[Update]]
function Game:update(dt)
end
--[[Draw]]
function Game:draw()
end
- Attachments
-
- learnLUBE.love
- learnLUBE 0.7.0
- (12.82 KiB) Downloaded 156 times
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: middleclass & middleclass-extras: Object Orientation for
I'm browsing the site from my mobile and won't be able to give this a look until tomorrow evening.
Is have never used Lube.
Is that how it is supposed to work, redefining the love callbacks, org is that your own invention?
Is have never used Lube.
Is that how it is supposed to work, redefining the love callbacks, org is that your own invention?
When I write def I mean function.
Who is online
Users browsing this forum: No registered users and 5 guests