Hello,
I'm currently trying something like
"GTK.GtkWindow subclass: MainWindow"
But maybe, that is not possible, because GtkWindow is no real class, but
a binding?
The reason, why I come to the question is, if I try the following code
in the open-method:
GTK.GtkWindow subclass: MainWindow [
MainWindow class >> open [
| r |
<category: 'user interface'>
r := self new: GTK.Gtk gtkWindowToplevel.
r initialize.
r show.
^r
]
initialize [
...
]
]
The VM errors out that "initialize" is not understood from GtkWindow.
I know I have a lot to learn, currently I'm a bit confused about the
fact, that "new" is a class-method and with the things that have an
association with that.
In Java I would call in the constructor of a subclassed class e.g.
super(bla); to initialize the object. How could that be done in smalltalk?
E.g. in my class, a class-method new could for instance call the super
new ... but would that not result in a new object?
MainWindow class >> new: aType [
super new: aType
]
Thanks in advance,
Joachim.
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk