Input to be abstracted…

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:

#include [kbytearraysearchtoolet.h]
Toolets.append( new KByteArraySearchToolet(this) );

Clean code, isn’ it?
And here the obligatory proof (as in fake^Wscreenshot) that it works:

Where is that byte string?

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?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s