Canol Gökel's blog

Simple XML Creator

Tagged:  •  


This is an extremely simple XML creator to create simple XML files quickly. The usage is like this:

html := XMLNode new: 'html'.

body := html add: (XMLNode new: 'body').
body at: 'bgcolor' put: '#ff0000'.

h1 := body add: (XMLNode new: 'h1').
h1 value: 'My Heading'.

p := body add: (XMLNode new: 'p').
p value: 'My paragraph'.

html fileOut: '/home/myhome/sample.xml'.

Which creates an XML file with the following content:

        <body bgcolor="#ff0000">
                <h1>My Heading</h1>
                <p>My paragraph</p>

You can download the package via:

gst-package --download SimpleXMLCreator -t ~/.st

or from:

Creating custom stock items in GTK+

Tagged:  •    •    •  

Let's say you want to put a tool button with a custom image, which is not among the stock items, to the toolbar of your GTK+ application. Here is the code for creating additional stock items from custom images:

"Variously sized versions of an image is held inside an icon set and icon sets are held inside icon factories. You may put one size of an image inside an icon set and GTK+ will scale it appropriately for your usage."

"First create an icon factory."
myIconFactory := GtkIconFactory new.

"Add that factory as a default icon factory so that the icons inside it can be found by the application."
myIconFactory addDefault.

"The image we want to create the icon from."
myImage := GtkImage newFromFile: 'Path/To/My/Image.png'.

GNU Smalltalk Monthly Digest (April 2011)

Tagged:  •    •    •  

Welcome to GNU Smalltalk (GST) monthly digest, a place to find a summary of happenings from the world of GST. If you don't know what GST is, you can look at [1] to learn more about this beautiful programming language.

Here are some of the news happened last month:

  • Nicolas Petton announced Jtalk. Jtalk is an implementation of the Smalltalk language that runs on top of the JavaScript runtime:

  • Gwenael Casaccio is now a part of Planet GNOME:

  • GNU Smalltalk 3.2.4 released:

  • GNU Smalltalk 4.1 is also released:

Nicolas Petton Interview

The WebQA did an interview with Nicolas Petton, co-author/author of Iliad Web Framework and Jtalk. You can find the interview here:

Installing GNU Smalltalk on Ubuntu 10.10

Ubuntu usually comes with an older version of GNU Smalltalk. To install a healthy GNU Smalltalk development environment which includes an IDE as well, here are the steps:

  1. Download the latest stable version (currently 3.2.4) using FTP:

Syndicate content

User login