How to inherit from Corona's Display Object ??

Objected Oriented Lua is possible using the following approach
http://lua-users.org/wiki/SimpleLuaClasses
https://github.com/kikito/middleclass/wiki/Quick-Example

How to inherit from Corona’s Display Object , so that the new instance of the class can be insert into Display Group ?

require("middleclass")  
  
Ball = class( DisplayObject )  
  
function Ball:initialize(x,y)  
 self.sprite = display.newCircle( x, y, 10 )  
end  
  
local b1 = Ball:new(100,100)  
  
local group = display.newGroup()  
  
group:insert(b1)  
  

[import]uid: 12088 topic_id: 13428 reply_id: 313428[/import]

Here’s my approach to inheritance with Corona display objects:

http://www.ludicroussoftware.com/blog/2011/07/06/simple-oop-with-inheritance-in-corona/

Is that the sort of thing you’re looking for?

Darren [import]uid: 1294 topic_id: 13428 reply_id: 50468[/import]

Depression can lead to serious consequences, including greater morbidity, disability, mortality and increased cost of care,” Helen said. “This study shows that adding a mind-body exercise like tai chi that is widely available in the community can improve the outcomes of treating depression in older adults, who may also have other, co-existing medical conditions, or cognitive impairment. With tai chi we may be able to treat these conditions without exposing them to additional medication
Panic Away
[import]uid: 96684 topic_id: 13428 reply_id: 60149[/import]