close #31 window ref deletion

This commit is contained in:
Paul Liverman III 2016-04-20 16:12:38 -07:00
parent fec58c231d
commit eb1ceeb390
7 changed files with 25 additions and 5 deletions

View File

@ -59,11 +59,6 @@ function love.load()
print(c.horizontal, c.vertical) print(c.horizontal, c.vertical)
local window = pop.window():align("center", "center"):setTitle("Welcome! This title is far too big!") local window = pop.window():align("center", "center"):setTitle("Welcome! This title is far too big!")
--window:addChild(pop.text("Welcome to Pop.Box()!"))
--window.window.clicked = function()
-- print("The proper window has been clicked!")
-- return true
--end
pop.window():setClose(false):setClose(true) pop.window():setClose(false):setClose(true)

View File

@ -243,6 +243,7 @@ do
end end
self.parent:removeChild(self) self.parent:removeChild(self)
self = nil self = nil
return nil
end end
} }
_base_0.__index = _base_0 _base_0.__index = _base_0

View File

@ -214,6 +214,13 @@ do
else else
return false return false
end end
end,
delete = function(self)
_class_0.__parent.__base.delete(self)
self.head = nil
self.title = nil
self.area = nil
self.close = nil
end end
} }
_base_0.__index = _base_0 _base_0.__index = _base_0

View File

@ -243,6 +243,7 @@ do
end end
self.parent:removeChild(self) self.parent:removeChild(self)
self = nil self = nil
return nil
end end
} }
_base_0.__index = _base_0 _base_0.__index = _base_0

View File

@ -214,6 +214,13 @@ do
else else
return false return false
end end
end,
delete = function(self)
_class_0.__parent.__base.delete(self)
self.head = nil
self.title = nil
self.area = nil
self.close = nil
end end
} }
_base_0.__index = _base_0 _base_0.__index = _base_0

View File

@ -262,3 +262,4 @@ class element
@parent\removeChild @ @parent\removeChild @
@ = nil @ = nil
return nil

View File

@ -288,3 +288,11 @@ class window extends element
return true return true
else else
return false return false
delete: =>
super!
@head = nil
@title = nil
@area = nil
@close = nil
return