[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Various bits to do with Gtk bindings
From: |
Mike |
Subject: |
Re: [Help-smalltalk] Various bits to do with Gtk bindings |
Date: |
Wed, 24 Dec 2003 10:18:25 +0000 |
On Tue, 23 Dec 2003 19:50:12 -0700
Lyndon Tremblay <address@hidden> wrote:
> I struggled with this in Objective-C. This is what I've been doing:
>
> GL translate: 0.0 y: 0.0 z: 0.0.
>
> The extra verbosity doesn't seem much value, since X and Width are usually
> first anyways.
>
> myWindow setDefaultWidth: 300 height: 180.
> myWindow defaultWidth: 300 height: 180.
> myWindow width: 300 height: 180.
True, although there are other examples where the first parameter is by no
means obvious:
GtkHBox new: true spacing: 3.
In this case, the first parameter is homogeneous, but
GtkHBox newHomogeneous: true spacing: 3.
is a pain to type, so I'm still in favour of the shorter scheme.
> > GtkAlignment new: 0.5 yalign: 0.5 xscale: 1.0 yscale: 1.0.
> >
>
> GtkAlightment alignment: (0.5 @ 0.5) scale: (1.0 @ 1.0).
>
> Then disassemble the Points with (alignment x) (scale y) etc.
I like that a lot - you're proposing it as a convenience method, though,
presumably?
There's a big need for convenience methods, for writing new code in Smalltalk,
although I also think that being able to translate already-written Gtk programs
from C into Smalltalk with as little fuss as possible is a very worthwhile aim.
If nothing else, so that people can take advantage of the pre-existing Gtk
tutorials.
Regards,
Mike
- Re: [Help-smalltalk] Various bits to do with Gtk bindings,
Mike <=