The birth of the Core

The Tutorius Core was designed with simplicity in mind. In order to have any chance of being used by anyone but us, we needed to have a core that required little to no modification of activities to work. Another goal was to make tutorials as easy to edit as possible. Those two goals serve the common purpose of making it easy to create and edit tutorials, even for someone with little technical background.

Before letting our brain do any work we started by hacking into an activity to generate a simple tutorial. The first tutorial was quite simple: how to turn text to bold in the Write activity. The first problem we faced was how to catch the different events in the interface and associate them with a concrete action. Catching the events was a simple matter of spidering down the GTK widget hierarchy and attaching an additionnal event handler to anything capable of generating events. Even though we then had all events, at that point it was pretty hard to tell if the bold button was the gtkButton instance at 0xb77a050c, or was it at 0xb77a093b? The widget hierarchy chain leading up to the button might have been a little better, but still it was tricky identifying the correct widget. The first solution to this problem was to name widgets using set_name. This allowed us to clearly know which button was pressed, focused or typed into. We added a little bit of control in the form of a rudimentary finite state machine – a dict in which keys are states, and values are a dict containing a message, and a set of possible events to catch that will lead to another state. This allowed us to create our first working prototype.

No Trackbacks

You can leave a trackback using this URL: http://tutorius.org/blog/the-birth-of-the-corela-naissance-du-noyau/trackback/

One Comment

  1. Although this was for our first prototype, things have slightly changed! We stopped the whole name calling business :)

    Posted March 13, 2009 at 9:30 am | Permalink

Post a Comment

Your email is never shared. Required fields are marked *

*
*