December 30, 2003
§ ¶Override, again
I finally got around to writing the last piece of the Virtual Method override mechanism.
![]()
The override keyword can now be used to hook directly into the native vtable.
A Safe and Happy New Year to all.
December 26, 2003
§ ¶Research
Last week, while in Pennsylvania to say goodbye to my uncle, I got the opportunity to do a little railfanning on the Pennsylvania RR. My folks grew up in and around a town named Derry, PA in the foothills of the Allegheny mountains. My dad's childhood home overlooked the Pennsy's main line from Pittsburgh to Philadelphia.
My dad and I got a chance to drive around a little one morning and visit the passenger station in Latrobe which has been converted to a restaurant now. One of the platforms is still used by Amtrak. Since I ran off an left my digital camera at home, I bought one of those disposable 35mm cameras and shot 27 pictures of the station which are currently in for processing at the local drug store. I don't have the patience for film photography any more. I need to duct tape my digital camera to my hand.
He also showed me where the old freight house used to be, and where the coke ovens used to be, and where the old Derry bridge used to be, and....
Too many damn "used to be's."
The talks that I've had with my folks trying to extract RR info have been so enjoyable that a Pennsy layout preserving a piece of my family's history is almost certainly in my future. It's amazing how just talking about an old station in Latrobe can unlock information people have had stored up in their heads for over 50 years.
I want to know more.
December 16, 2003
§ ¶Vacation, sans Lampoon
I've noticed that Monologue has been full of vacation announcements, lately. Many of them include statements like "I'm visiting Hometown, Earth this week so if anybody wants to get together and discuss mono, get in touch."
I'm on vacation until next year, but I'm staying at home, so don't bug me about Gtk#.
Just kidding.
I plan on doing a little hacking over the holidays. But my mailing list responses may be a bit slower for the next few weeks, so please be patient. Why not sing a chorus or two of Jingle Bells while you are waiting?
December 11, 2003
§ ¶Sadness

A photographer I'm not, but...
This is how I will remember Ettore. Smiling.
December 10, 2003
§ ¶Virtually finished
Lately, I've been spending most of my time on a C# virtual method overiding mechanism for default signal handlers. I committed the second chunk of generation code today, putting the rest of the generation piece in place. The new generation code produces the following elements for each signal:
- A delegate type and static member used to create GClosures.
- A protected virtual method which chains to the default class closure via g_signal_chain_from_overridden.
- A delegate implementor which marshals from native to managed parameter types, calling the virtual method.
- A protected method to instantiate the static delegate member if necessary and connect it to the vtable via g_signal_override_class_closure.
All that's left is to write the reflection code to scan a Type for methods with a base implementation containing the GLib.DefaultSignalHandler attribute. If it finds any, it will call the connect methods to hook into the native vtable. This code can be added to the existing RegisterGType method that is called to create native subclasses.
With that in place, overriding default signal handlers will be as simple as applying the override keyword.
December 03, 2003
§ ¶Slaying the dragon
There's been a lot of progress in Gtk# recently. Ettore has been working through the mess in Drag n' Drop and making some good progress. He landed a big commit today, including a port of TestDnd from gtk+, but there's still work to be done. We think we might be running up against a runtime bug now related to the marshaling of arrays of structs containing string fields. Gtk# has been on the bleeding edge of the marshaling curve ever since way back in the day.
Peter Williams posted a patch for an args passing bug that presents an interesting challenge. We're looking for feedback and ideas on how to make this a little cleaner, perhaps.
I committed a patch with a 1200 line diff today that finally once and for all slayed the beast that was Parameters.CreateSignature. This was probably the last bastion of structured programming in the generator. I really like the looks of things now.
This refactor was prompted by the work I have been doing toward a virtual method overriding mechanism for default signal handlers. This is the major roadblock left for serious custom widget development in your .Net language of choice. I've got a lot of vacation coming up, but I'm hoping to have this done before I disappear for a long Xmas nap.

