lib/ppcurses/application.rb in ppcurses-0.1.0 vs lib/ppcurses/application.rb in ppcurses-0.1.1

- old
+ new

@@ -144,9 +144,24 @@ @terminated = false end def content_view=(value) + + if @content_view != nil then + # Clear current content_view before reassignment + frame = @content_view.frame + x = frame.origin.x + y = frame.origin.y + height = frame.size.height + + for i in y..y+height-1 + @screen.setpos( i, x ) + @screen.clrtoeol ## TODO use width !!! + end + + end + @content_view=value @main_menu.next_responder=@content_view end def create_default_menubar