On Nov 14, 9:12 am, "Edward K. Ream" <[email protected]> wrote:
> 1. At present, various frame classes all define local variations of > the high-level interface. This is a large violation of the Don't > Repeat Yourself principle. I would like to eliminate these repeats > using a single base class. Done at the trunk at rev 4799. All unit tests pass locally/ externally. This turned out to be straightforward: the leoBody and leoLog classes are now subclasses of the new HighLevelInterface class. This eliminates a lot of duplicate code. Almost all the methods of HighLevelInterface are "redirection" methods that simply call the corresponding method on self.widget. The various "widget" classes provide the actual code. The only drawback is that each instance of HighLevelInterface must have a "widget" ivar. leoBody already had such a thing. leoLog did not. The "widget" ivar must always be identical to body.bodyCtrl or the log.logCtrl ivars. It's not a horrible constraint, but bad things will happen if one is updated and not the other. The only remain task: the final cleanup and a new unit test that enforces the relationships between component classes. That will be easy. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
