npcole / npyscreen

Automatically exported from code.google.com/p/npyscreen
Other
481 stars 109 forks source link

wgForm.py and his OK button #100

Open jerome-diver opened 4 years ago

jerome-diver commented 4 years ago

This module has a OKBUTTON_TYPE who can not easily be override from inherited class. And this button call afterEditing method who is a bad design due to some impossible actions to do. Well... for surround it, i do create a OK_Button class to handle a when_pressed method to be override (i do copy your ActionForm way to do, but i use a conventional method PEP8 syntax snake case instead...) and override my used SplitForm.OKBUTTON_TYPE with this object... It should be easy to correct your code to just handle OK_BUTTON the way to provide a when_pressed or on_ok method to override.