I'm not sure how should I, for making the GUI we mainly based on the ContactList example on PharoCasts:
http://www.pharocasts.com/2011/02/pharo-gui-with-polymorph.html
This is my child window:
UIPrestamos>>openModal
openModal
������ | builder content dialog |
������ prestamo id: (Prestamo database size = 0 ifTrue: 1 ifFalse: [Prestamo database last id + 1]) asString.
������ builder := UITheme builder.
������ content := builder
������ ������ newLabelGroup:
������ ������ ������ {('Prestamo: '
������ ������ ������ ������ ->
������ ������ ������ ������ ������ (builder
������ ������ ������ ������ ������ ������ newLabelFor: self prestamo getLabel: #id getEnabled: nil�� )).
������ ������ ������ ('Socio '
������ ������ ������ ������ ->
������ ������ ������ ������ ������ (builder
������ ������ ������ ������ ������ ������ newTextEntryFor: self prestamo
������ ������ ������ ������ ������ ������ getText: #idSocio
������ ������ ������ ������ ������ ������ setText: #idSocio:
������ ������ ������ ������ ������ ������ help: 'Codigo de Socio')).
������ ������ ������ ������ ������ ������ ('Ejemplar: '
������ ������ ������ ������ ->
������ ������ ������ ������ ������ (builder
������ ������ ������ ������ ������ ������ newTextEntryFor: self prestamo
������ ������ ������ ������ ������ ������ getText: #idEjemplar
������ ������ ������ ������ ������ ������ setText: #idEjemplar:
������ ������ ������ ������ ������ ������ help: 'Codigo de Ejemplar'))}.
������ dialog := builder newPluggableDialogWindow: 'Nuevo Prestamo' for: content.
������ builder openModal: dialog.
������ dialog cancelled ifFalse: [self doOnOK].
----
������ prestamo := Prestamo new.
������ alerta := AlertDialogWindow new.
������ ������ onOK: [ ((Ejemplar�� database anySatisfy: [:x | x idEjemplar = prestamo idEjemplar and: (x fechaBaja = '') ]) and: (Socio�� database anySatisfy: [:y| y numeroDeSocio = prestamo idSocio])) ifTrue: [Prestamo database add: prestamo] ifFalse: [alerta alert: 'El socio o el ejemplar no se encuentra disponible'].
������ ������ ������ ������ seleccionado := Prestamo database size.
������ ������ openModal.