Work on Okteta continued a little. Yesterday I added a Find toolet, by doing also massive hacking in the program framework – not. All code that had to be done there was:
Toolets.append( new KByteArraySearchToolet(this) );
Clean code, isn’ it?
And here the obligatory proof (as in fake^Wscreenshot) that it works:
At the moment toolets are hardcoded, as seen above. Later they should be loadable as plugins, on demand and/or profile. I also had a look at the frameworks of Kate, KDevelop, KOffice/Flake and Ligature. Oh, don’t they all do the same with regard to managed model/view based programs, at least a little? I have the idea there is a way to merge all their frameworks into the one Okteta is based on. And I will try to come up with something of that kind, yeah 😛 It seems to be just a question of doing enough abstraction. And time.
Abstraction seems to be a key. When reading about parsing and operational semantics of languages it finally struck me: What else is the series of inputs by mouse/keyboard? It also is just a language of a certain grammar, and the input event handler just does the tokenizing/parsing/attributing and translates it into control commands like place cursor, select, drag etc. Now, this point of view gives me a new approach how to design the controller/toolets. And I think a promising one, once more. Did I already tell I like to design?