[Newbies] HELP!! can't use windows in a proper way

Herbert König herbertkoenig at gmx.net
Mon Sep 4 19:52:20 UTC 2006

Hello Gonzalo,

GR> hi this is the first mail a send to this list, so I'll introduce my
GR> self, I'm an Argentinian systems engineering student  from UTN

welcome, I'm a 50+ self employed German electronic engineer with far
too little time for squeak :-))

GR> (national tecnological university) introduction done here's the thing:
GR> I'm implementing a genetic algorithm in squeak  I've found an
GR> implementation but a wanted to do it my self, I managed to make all
GR> the code from the algorithm itself but i can't find the way to display
GR> it properly, on a nice window, I have implemented printOn: in all my

If you need an example of a traditional window gui look into
TestRunner>>openAsMorph, this (in 3.6) helped me.

For myself I usually don't bother to put a GUI into a window but you
easily can put this in a system window. The attached gif shows a
sample of the attached class. A Sofm is (in this case) a rectangular
(here I  think 12x12) neural network. The activation of an output is
shown as a shade of blue, the rectangles are arranged according to
their coordinates in the network.

So I see how the Input sentence of the second line 'ZD(15V)...'
excites the network.

The buttons "Vorheriges" and "Nächstes" select the previous or next
sentence, and the "Trainiere.." buttons train the network. "Verlassen"
exits the GUI.

GR> classes so i'm able to print all my individuals and populations
GR> what i need is to have graphics of how they evolve and put them on a
GR> window i know how to create a window but I don't how to put things on
GR> them, and I've browse the senders of addMorph: Frame: but I dont
GR> understand them.

What have I done?.
Start browsing with buildGui.
Please note, a TableLayout in spite of its name is a layout of rows or
columns, depending on #listDirection.

#buildHeadline puts a simple TextMorph on the top, use addMorphBack to
get the expected sequence.

#buildCurrentComment does just the same, text is changed with
#updateCurrentComment, contents: takes a String as the argument.

#buildRows just builds the array of morphs, which are coloured in

#buildButtons builds two rows of buttons linking into the data model.

This is just a crude example. You may want to put LineMorphs on your
display to plot your fitness over the generations.

Also get the PluggableMorphsDemo.pr (I think from the swiki, just
google) to get an understanding how to link a UI to a data model.

Hope it helps, your request is a bit unspecific. No criticism, you
just don't yet know what to ask, I know that feeling :-))

To keep my perspective I still work in assembler sometimes :-))


Herbert                            mailto:herbertkoenig at gmx.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SofmTrainingsDisplay.st
Type: application/octet-stream
Size: 8629 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/beginners/attachments/20060904/e0bfc061/SofmTrainingsDisplay-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SofmTrainingsDisplay.gif
Type: image/gif
Size: 7022 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/beginners/attachments/20060904/e0bfc061/SofmTrainingsDisplay-0001.gif

More information about the Beginners mailing list