Actually the code of the GUI is inspired on the Pharocast video on the making of a Contact list. I wonder if the list is static since is defined there as a newListFor and because that you can't send any message to it, I'm sure there should be a way to do it so #onPrestamosClick look like: --- #onPrestamosClick listMorph list: Prestamo database. --- or something like that. On Wed, Jan 2, 2013 at 6:12 AM, Frank Shearar <frank.shearar@gmail.com>wrote:
On 2 January 2013 09:09, Peter Hugosson-Miller <oldmanlink@gmail.com> wrote:
Quick question: what's with all the curly braces? This doesn't look much like Smalltalk code to me :-P
I don't know how much this is tongue-in-cheek: assuming none ( :) ), it's a literal Array assembled by sending messages, as opposed to the other kind of literal Array: #(1 (2 3)) = Array with: 1 with: (Array with: 2 with: 3).
frank
-- Cheers, Peter.
On 2 jan 2013, at 10:02, J. P. L. MartÃn <arguser@gmail.com> wrote:
Hello, I'm having trouble to figure out how to do this, I have a simple window with 3 buttons, each button should change the content listed on the list below them but I'm really not sure about how to do it.
This is the code for the window: --- open "Abre la ventana principal del Sistema de Gestion Bibleotecaria"
| builder contain | builder := UITheme builder. contain := builder newColumn: {builder newRow: { builder newButtonFor: self action: #onPrestamosClick label: 'Prestamos' help: ''. builder newButtonFor: self action: #onMaterialesClick label: 'Materiales' help: ''. builder newButtonFor: self action: #onSociosClick label: 'Socios' help: ''}. builder newColumn: { builder newListFor: self list: nil selected: nil changeSelected: nil help: '' }.}.
(contain openInWindowLabeled: 'Babel') extent: 600@600. ---
How should I define #onLabelClick to set the list to for example: Prestamo database.
Thanks in advance.