Should I document my very first steps?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Should I document my very first steps?

Joachim Jaeckel
Hello all.

I'm absolute new to smalltalk. Ok, I tried it a few years ago, but
without any real result.
(But I learned a lot more from the book "The Design Pattern Smalltalk
Companion" than from the "original" GOF Book about Patterns.)

Comming from Cobol and C in the beginning, than with Perl and Java
knowledge, I'm trying to make now my first steps with smalltalk.

Yesterday, I brought up my first GTK-Gui Window (please don't laugh...)
and it was not really easy to start (google here, looked there and found
eventually the packages/gtk/examples_*.st files)

And to cut a long story short, I'd like to ask, if I should document my
  experiences in something like an "Absolute Beginners \"Guide\"" to the
gnu-smalltalk wiki or a gnu-smalltalk blog?

Thanks in advance.

Joachim.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Should I document my very first steps?

ZuLuuuuuu
On Sun, 24 May 2009 14:59:31 +0200, Joachim Jaeckel wrote:

> Hello all.
>
> I'm absolute new to smalltalk. Ok, I tried it a few years ago, but
> without any real result.
> (But I learned a lot more from the book "The Design Pattern Smalltalk
> Companion" than from the "original" GOF Book about Patterns.)
>
> Comming from Cobol and C in the beginning, than with Perl and Java
> knowledge, I'm trying to make now my first steps with smalltalk.
>
> Yesterday, I brought up my first GTK-Gui Window (please don't laugh...)
> and it was not really easy to start (google here, looked there and found
> eventually the packages/gtk/examples_*.st files)
>
> And to cut a long story short, I'd like to ask, if I should document my
>   experiences in something like an "Absolute Beginners \"Guide\"" to the
> gnu-smalltalk wiki or a gnu-smalltalk blog?
>
> Thanks in advance.
>
> Joachim.

Why not :) I think, every contribution (small/big) will be appreciated
and reading some experiences on GUI stuff with GST might be very helpful
since there is not much doc about it.



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Canol Gökel
Reply | Threaded
Open this post in threaded view
|

Re: Should I document my very first steps?

ZuLuuuuuu
In reply to this post by Joachim Jaeckel
Joachim Jaeckel <joachim.jaeckel <at> lucke-edv.de> writes:

>
> And to cut a long story short, I'd like to ask, if I should document my
>   experiences in something like an "Absolute Beginners \"Guide\"" to the
> gnu-smalltalk wiki or a gnu-smalltalk blog?
>
> Thanks in advance.
>
> Joachim.
>

Why not :) I think, every contribution small/big will be appreciated and reading
some experiences on GUI stuff with GST might be very helpful since there is not
much doc about it.



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Canol Gökel
Reply | Threaded
Open this post in threaded view
|

Re: Should I document my very first steps?

Stefan Schmiedl
In reply to this post by Joachim Jaeckel
On Sun, 24 May 2009 14:59:31 +0200
Joachim Jaeckel <[hidden email]> wrote:

> And to cut a long story short, I'd like to ask, if I should document
> my experiences in something like an "Absolute Beginners \"Guide\"" to
> the gnu-smalltalk wiki or a gnu-smalltalk blog?

Yes, please do.

Register on the gnu-smalltalk website and blog about
how you did what you did. Give the post appropriate
tags and make life better for us other newbies.

Thanks,
s.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Should I document my very first steps?

Paolo Bonzini-2
In reply to this post by Joachim Jaeckel
> Yesterday, I brought up my first GTK-Gui Window (please don't laugh...) and
> it was not really easy to start (google here, looked there and found
> eventually the packages/gtk/examples_*.st files)

Nobody is going to laugh!

> And to cut a long story short, I'd like to ask, if I should document my
>  experiences in something like an "Absolute Beginners \"Guide\"" to the
> gnu-smalltalk wiki or a gnu-smalltalk blog?

Yes, of course!

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Should I document my very first steps?

Joachim Jaeckel
Thanks for your response, than I'll start such a blog.

Give me some time to phrase it and please, don't hesitate with comments,
what I could do better.

Regards,
Joachim.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Subclassing GTK "Classes" possible?

Joachim Jaeckel
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
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Subclassing GTK "Classes" possible?

Paolo Bonzini-2
Joachim Jaeckel wrote:
> 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?

More or less -- because GtkWindow>>#new: is not a real method, but a
binding.  Binding classes are not special; binding methods are.

It would not be hard to add a feature to the VM and use it in GtkWindow
class>>#new:, so that an instance of your MainWindow class would be
returned.  There is a disadvantage: that in many cases you would not be
able to override methods---because the overrides would have to be linked
to the vtable of a GTK class.

So, I am not sure whether the advantage balances the disadvantage.
Gwanael's code is using containment instead, with a separate class
hierarchy rooted at a simple class that is just a container of
GtkWindows.  I think I prefer that approach.

> 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?

You can do that with "^super new initialize" or better "^self basicNew
initialize" (#basicNew is defined to be the same as Object's
implementation of #new).  The latter is better because it avoids double
initialization in case "super new" was already calling #initialize.

Thanks!

Paolo



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk