Thursday, August 24, 2006

SqueakGtk latest features

With the latest MC version 68, SqueakGtk got lots of improvements:
  • GTK+ 2.10 enhancements (Printing, StatusIcon, Assistant and RecentFiles)
  • Strong callback handling and a refactored signal handling
  • Object finalization support with GObject weak references
  • New wrappers around GType/GValue/GParamSpec allowed to improve the GtkInspector
  • As usual, various fixes
A new screenshot is available at http://squeakgtk.pbwiki.com/ScreenShots.
Please help me... if anyone is interested contact me: lethalman88 at gmail dot com.

Bye ;)

Sunday, August 20, 2006

Catching garbage collecting

I see many times Squeakers ask questions about finalizing objects when the garbage collector is called.

Squeak startups a finalizing process inside WeakArray which finalize values of its Weak dependents (for example WeakRegistry objects).

First of all you need to subclass Object, call the new class GCTest.
Add a #finalize method to it:
finalize
    Transcript show: 'finalizing'

Now open a Transcript and a Workspace and doIt this:
gcTest _ GCTest new.
WeakRegistry default add: gcTest

Now close the Workspace and look at the Transcript saying 'finalizing'.

Usually, you won't register your objects into the default WeakRegistry, you can also create your own WeakRegistry.
Take care the WeakRegistry is also garbage collected, so you need to place it as a global variable of your base class for instance: look at Socket or StandardFileStream as valid examples.

NB: when creating a new WeakRegistry, it's automatically added as a Weak dependent in WeakArray

Wednesday, August 16, 2006

GNOME from scratch on Slackware 10.2 and Kernel 2.4

Recently i wanted to try Gnome 2.14 on my Slackware box, then i tried to install Dropline Gnome. The problem was that i need Gtk 2.10 for my SqueakGtk wrapper, then i chose to install Gnome from sources.
I didn't have any problem, everything worked correctly and i had my Gnome running as well.

However, there was a problem, i had to upgrade to libgnomeui 2.15 since it's more compatible with Gtk 2.10. After that, system tools 2.15 were updated for Slackware 10.2 and the "war" begun :) New dependencies have been emerged, like dbus and liboobs... ok i installed them but finally i got another dependency: HAL.

So... Gnome 2.15 needs Kernel 2.6... i can't use the Kernel 2.6 then i switched back to Kde. Simple :) i dislike this kind of dependencies really, it should be a bit more flexible and also i don't see any need to keep dbus at all.

I hope this won't happen for Gtk+ too, bye Gnome!

Wednesday, August 09, 2006

SqueakGtk, a bunch of enhancements

This screenshot at http://squeakgtk.pbwiki.com/f/Demos-10082006.gif shows the new enhancements made in the latest 10 MC versions. New features include:
  • GdkPixbuf enhancements
  • GtkIconView creation
  • GtkClipboard creation
  • Basic Drag and Drop support
  • Text widget improvements
  • Callback functions support
  • Several important fixes
  • and so on...
Stay tuned with SqueakGtk, please contact me at lethalman88 at gmail dot com for any suggestion or critique.

Bye and thanks to everyone who helped me till now, especially the squeak-dev ML and #squeak channel :)

Wednesday, August 02, 2006

SqueakGtk halos

You all know that Morphic has halos: those small buttons around a Morph. SqueakGtk is going to have this kind of feature, currently really basic; it just work for inspecting a widget.
First run this code into a Workspace:
Gtk default useHalos: true

This will cache all created GtkWidget objects. Now you can open a simple window with widgets inside of it and run this code:
Gtk default enterHalos

Now do Ctrl + left mouse button click and an inspector (ore more than one) should open on the clicked widget.

When you don't need halos anymore just type:
Gtk default leaveHalos

In the next version, probably, this feature can be improved. Right now it's just a funny test.

Also the inspector is not complete, i just added a few property specs. It really needs to be improved a lot and also to be more automated instead of creating a specification for each GObject.

Left old WordPress blog

I switched to blogger.com because the previous blog has been unmantained by me.
Also i hope to write something interesting here... bye ;)