Monthly Archives: March 2012

classes, interfaces and properties in Javascript/gjs

Thought I’d share some more Javascript snippets with you zany kids. Firstly, how to implement an interface (specifically a GInterface), for example an Mx.ItemFactory: const ButtonFactory = new Lang.Class({ Name: ‘ButtonFactory’, Extends: GObject.Object, Implements: [ Mx.ItemFactory ],   _init : … Continue reading

Posted in javascript | 6 Comments

lilypond scales generator

I picked up my saxophone for the first time in a while last night and went along to a big band rehearsal. Very quickly discovered that I’ve forgotten most of my scales and that I need to do some practice. … Continue reading

Posted in Uncategorized | Comments Off

Gtk.ListStores and Clutter.ListModels in Javascript/gjs

It’s surprisingly hard to find this, and the generated documentation is actually misleaingly wrong1, so here’s how to create ListStores and ListModels in Javascript with gjs. let store = new Gtk.ListStore(); store.set_column_types([GObject.TYPE_STRING, GObject.TYPE_INT]); store.insert_with_valuesv(-1, [ 0, 1 ], [ "test", … Continue reading

Posted in clutter, example code, gtk, javascript | 1 Comment

wireless issues with rtl8192ce and Thinkpad X220

I rebooted the other day, which got me a new kernel (3.2.91), and now it seems my wireless (rtl8192ce) has become really flaky and unstable. At first I thought it was the router playing up, but everything else in the … Continue reading

Posted in Uncategorized | 13 Comments

libpeas

Seriously impressed with libpeas. I think about my previous work adding plugins to things (some of them involved Bonobo) and I think how much easier it would have been if this technology was around back then. It was very simple … Continue reading

Posted in Uncategorized | 1 Comment