News

Minimizing Code

2014. 06. 25.

The architecture is a nice and extendable structure. But it has some drawbacks. Minor speed reduction due to the fact that every event in the view classes need to call through the assigned listeners, probably not noticable, and the overhead of managing much more code. I usually like to implement things as in the big book, but I also think that sometimes it is better to simply merge view and control classes. So that is what I did.

Also some new features were implemented. The preview is now not shown when the Document instaces previewAllowed method return false. Basically that means that plain text documents are not rendered as HTML. I created the callback for the new note menu item. It opens a Window subclass which adds a TextField and two Buttons to it. It is constructed with the DocumentList and the button click calls its create method.