Add a Pages:getSelectedPage() helper

Equivalent to select(2, pages:getSelected()), but more readable.
develop
lethosor 2017-06-23 12:46:46 -04:00
parent 789fc6dde0
commit db375ae83b
1 changed files with 4 additions and 0 deletions

@ -109,6 +109,10 @@ function Pages:getSelected()
return self.selected, self.subviews[self.selected] return self.selected, self.subviews[self.selected]
end end
function Pages:getSelectedPage()
return self.subviews[self.selected]
end
---------------- ----------------
-- Edit field -- -- Edit field --
---------------- ----------------