Monday, November 29, 2010

Coding Progress

With as crazy busy as my teaching schedule is keeping me this year, it's challenging to find coding time on the weekends and nearly impossible during the week, but with Thanksgiving Break giving me a 5-day weekend, I managed to get another lesson posted and do some serious hacking. The target this time? PDesigner. It hasn't received much attention in quite a while, but it has been a learning experience from its infancy. It's yet another visual GUI designer, but it bears almost no resemblance to anything coming out of Redmond -- or anywhere else, for that matter.

PDesigner is quite different from anything that people might have seen back in the heyday of BeOS because, unlike them, the internal architecture is extremely general. An entire object system had to be created to wrap around each of the control classes available in Haiku. This object system is what sets PDesigner apart from the rest: the project that you are creating manipulates the control objects while they are running -- the GUI is live as you work on it.This might sound like a cool feature that doesn't have much use, but it makes possible something else: scripting from any language. PDesigner's object interface is string-based, so it's pretty easy to write bindings to the object system for any language you can think of. Last summer a group of students from the University of Auckland created a Python interface to PDesigner's object system.

I spent quite a lot of time over the long weekend getting out bugs and expanding its capabilities, such as good support for methods and working around some of the lack of flexibility inherent to the C++ language. Bolting methods onto an object is really easy now. A program of this size is definitely not something that'll be finished next week, but it will open up new possibilities. Here's a screenshot just for your enjoyment. TTFN :-)

Friday, November 26, 2010

Lesson 14: I Node What You Did Last Summer

A holiday treat! In this lesson we continue to work our way through the Storage Kit, learning about one of the lesser-known features of the Haiku API: node monitoring. For those new to Haiku, it notifies programs of changes to the filesystem, such as changes in a name, etc. If you're looking to turn a good Haiku app into a fine one, this is one way to do it.

Programming with Haiku, Lesson 14

Wednesday, November 17, 2010

Lucky Lesson 13: Queries

I'm not talking about databases, either. In this lesson, we examine one of the most distinctive features Haiku has: the query. We get a good, long look into the murky depths that are the query's official syntax, Reverse Polish Notation, and a few other weird and wonderful tricks. Enjoy!

Programming with Haiku, Lesson 13

Not Off the Radar Yet

I can't even put into words how busy I've been the last few weeks. My last post was a little more than 3 weeks ago, but it has felt like an eternity. This past month or so I've had to deal with three separate incidents of a sick child and spending a week keeping the house running while the other half was busy being ill, as well. Not the least bit fun. School has been crazy busy with more than I care to enumerate here. It's been a lot, needless to say -- makes me wish for times that were much easier to find a few spare moments. I haven't given up and I haven't gone anywhere, but at least all two of you out there know what I've been up to. :-)