helper to clear the view

This commit is contained in:
Torsten Ruger 2015-10-21 14:03:23 +03:00
parent 45a2c707da
commit 4752732bf8

View File

@ -52,6 +52,11 @@ class ListView < ElementView
element.remove
end
# remove all elements and views, basically resetting the list to empty
def clear_view
remove_first while( ! @children.empty? )
end
# append a View instnace to the children array
# render it and append it to the html element
# and keep a copy in @elements